zx/public/static/js/pages-users-user_get_coupon...

1 line
9.2 KiB
JavaScript
Raw Blame History

This file contains ambiguous Unicode characters

This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.

(window["webpackJsonp"]=window["webpackJsonp"]||[]).push([["pages-users-user_get_coupon-index"],{"02aa":function(t,e,n){"use strict";n("6a54");var i=n("f5bd").default;Object.defineProperty(e,"__esModule",{value:!0}),e.ajcaptchaCheck=function(t){return o.default.post("ajcheck",t,{noAuth:!0})},e.appleAppAuth=function(t){return o.default.post("auth/apple",t,{noAuth:!0})},e.appletsDecrypt=function(t){return o.default.post("user/mp/binding",t)},e.bindingPhone=function(t){return o.default.post("user/binding",t)},e.getAjcaptcha=function(t){return o.default.get("ajcaptcha",t,{noAuth:!0})},e.getAppVersion=function(){return o.default.get("appVersion",{},{noAuth:!0})},e.getArticleBannerList=function(){return o.default.get("article/banner/list",{},{noAuth:!0})},e.getArticleCategoryList=function(){return o.default.get("article/category/lst",{},{noAuth:!0})},e.getArticleDetails=function(t){return o.default.get("article/detail/"+t,{},{noAuth:!0})},e.getArticleHotList=function(){return o.default.get("article/hot/list",{},{noAuth:!0})},e.getArticleList=function(t,e){return o.default.get("article/lst/"+t,e,{noAuth:!0})},e.getAssistData=function(t){return o.default.get("diy/assist",t,{noAuth:!0})},e.getCateData=function(t){return o.default.get("diy/category",t,{noAuth:!0})},e.getCity=function(){return o.default.get("system/city/lst",{},{noAuth:!0})},e.getCityList=function(t){return o.default.get("v2/system/city",{address:t},{noAuth:!0})},e.getCityV2=function(t){return o.default.get("v2/system/city/lst/"+t,{},{noAuth:!0})},e.getCombinationData=function(t){return o.default.get("diy/group",t,{noAuth:!0})},e.getCouponData=function(t){return o.default.get("diy/coupon",t,{noAuth:!0})},e.getCoupons=function(t){return o.default.get("coupon/product",t,{noAuth:!0})},e.getDiy=function(t){return o.default.get("diy",t,{noAuth:!0})},e.getIndexData=function(){return o.default.get("common/home",{},{noAuth:!0})},e.getLiveData=function(t){return o.default.get("diy/broadcast",t,{noAuth:!0})},e.getLiveList=function(t,e){return o.default.get("wechat/live",{page:t,limit:e},{noAuth:!0})},e.getLogo=function(){return o.default.get("wechat/get_logo",{},{noAuth:!0})},e.getOpenAdv=function(){return o.default.get("open_screen",{},{noAuth:!0})},e.getPageDiy=function(t){return o.default.get("micro",t,{noAuth:!0})},e.getPresellData=function(t){return o.default.get("diy/presell",t,{noAuth:!0})},e.getProductData=function(t){return o.default.get("diy/spu",t,{noAuth:!0})},e.getSeckillData=function(t){return o.default.get("diy/seckill",t,{noAuth:!0})},e.getShopCoupons=function(t){return o.default.get("coupon/store/"+t,{},{noAuth:!0})},e.getTemlIds=function(){return o.default.get("wechat/teml_ids",{},{noAuth:!0})},e.getUserCoupons=function(t){return o.default.get("coupon/list",t)},e.graphicLstData=function(t){return o.default.get("diy/community",t,{noAuth:!0})},e.hotRankingList=function(t){return o.default.get("diy/hot_top",t,{noAuth:!0})},e.loginMobile=function(t){return o.default.post("login/mobile",t,{noAuth:!0})},e.logout=function(){return o.default.get("logout")},e.modifyPassword=function(t){return o.default.post("user/change/password",t)},e.modifyPhone=function(t){return o.default.post("user/change/phone",t)},e.phoneLogin=function(t){return o.default.post("login",t,{noAuth:!0})},e.phoneRegister=function(t){return o.default.post("register",t,{noAuth:!0})},e.phoneRegisterReset=function(t){return o.default.post("register/reset",t,{noAuth:!0})},e.pink=function(){return o.default.get("pink",{},{noAuth:!0})},e.registerVerify=function(t,e,n,i){return o.default.post("register/verify",{phone:t,type:void 0===e?"reset":e,key:n,code:i},{noAuth:!0})},e.setCouponReceive=function(t){return o.default.post("coupon/receive/"+t)},e.setFormId=function(t){return o.default.post("wechat/set_form_id",{formId:t})},e.storeList=function(t){return o.default.get("diy/store",t,{noAuth:!0})},e.switchH5Login=function(t){return o.default.post("user/switch",t)},e.verifyCode=function(){return o.default.get("verify_code",{},{noAuth:!0})},e.wechatAppAuth=function(t){return o.default.post("auth/app",t,{noAuth:!0})};var o=i(n("fea3"))},"0853":function(t,e,n){"use strict";n.r(e);var i=n("ebab"),o=n.n(i);for(var u in i)["default"].indexOf(u)<0&&function(t){n.d(e,t,(function(){return i[t]}))}(u);e["default"]=o.a},6001:function(t,e,n){"use strict";n.r(e);var i=n("a183"),o=n("0853");for(var u in o)["default"].indexOf(u)<0&&function(t){n.d(e,t,(function(){return o[t]}))}(u);n("77c8");var a=n("828b"),s=Object(a["a"])(o["default"],i["b"],i["c"],!1,null,"711cfca3",null,!1,i["a"],void 0);e["default"]=s.exports},"60d4":function(t,e,n){var i=n("c86c");e=i(!1),e.push([t.i,'@charset "UTF-8";\n/**\n * 这里是uni-app内置的常用样式变量\n *\n * uni-app 官方扩展插件及插件市场https://ext.dcloud.net.cn上很多三方插件均使用了这些样式变量\n * 如果你是插件开发者建议你使用scss预处理并在插件代码中直接使用这些变量无需 import 这个文件方便用户通过搭积木的方式开发整体风格一致的App\n *\n */\n/**\n * 如果你是App开发者插件使用者你可以通过修改这些变量来定制自己的插件主题实现自定义主题功能\n *\n * 如果你的项目同样使用了scss预处理你也可以直接在你的 scss 代码中使用如下变量,同时无需 import 这个文件\n */\n/* 颜色变量 */\n/* 行为相关颜色 */\n/* 背景颜色 */\n/* 边框颜色 */\n/* 尺寸变量 */\n/* 文字尺寸 */\n/* 图片尺寸 */\n/* Border Radius */\n/* 水平间距 */\n/* 垂直间距 */\n/* 透明度 */\n/* 文章场景相关 */.condition .line-title[data-v-711cfca3]{width:%?90?%;padding:0 %?10?%;box-sizing:border-box;background:#fff7f7;border:1px solid #e83323;opacity:1;border-radius:%?20?%;font-size:%?20?%;color:#e83323;margin-right:%?12?%}.condition .line-title.gray[data-v-711cfca3]{border-color:#bbb;color:#bbb;background-color:#f5f5f5}.coupon-list .pic-num[data-v-711cfca3]{color:#fff;font-size:%?24?%}',""]),t.exports=e},6573:function(t,e,n){var i=n("60d4");i.__esModule&&(i=i.default),"string"===typeof i&&(i=[[t.i,i,""]]),i.locals&&(t.exports=i.locals);var o=n("967d").default;o("59fcfeb0",i,!0,{sourceMap:!1,shadowMode:!1})},"77c8":function(t,e,n){"use strict";var i=n("6573"),o=n.n(i);o.a},a183:function(t,e,n){"use strict";n.d(e,"b",(function(){return i})),n.d(e,"c",(function(){return o})),n.d(e,"a",(function(){}));var i=function(){var t=this,e=t.$createElement,n=t._self._c||e;return n("v-uni-view",[t.couponsList.length?n("v-uni-view",{staticClass:"coupon-list"},t._l(t.couponsList,(function(e,i){return n("v-uni-view",{key:i,staticClass:"item acea-row row-center-wrapper"},[n("v-uni-view",{staticClass:"money",class:e.is_use?"moneyGray":""},[n("v-uni-view",[t._v("¥"),n("v-uni-text",{staticClass:"num"},[t._v(t._s(e.coupon_price))])],1),n("v-uni-view",{staticClass:"pic-num"},[t._v("满"+t._s(e.use_min_price)+"元可用")])],1),n("v-uni-view",{staticClass:"text"},[n("v-uni-view",{staticClass:"condition line1"},[0===e.type?n("span",{staticClass:"line-title",class:1==e.is_use||2==e.is_use?"gray":""},[t._v("通用劵")]):1===e.type?n("span",{staticClass:"line-title",class:1==e.is_use||2==e.is_use?"gray":""},[t._v("品类券")]):n("span",{staticClass:"line-title",class:1==e.is_use||2==e.is_use?"gray":""},[t._v("商品券")]),n("span",[t._v(t._s(e.title))])]),n("v-uni-view",{staticClass:"data acea-row row-between-wrapper"},[n("v-uni-view",[t._v(t._s(e.start_time?e.start_time+"-":"")+t._s(e.end_time))]),1==e.is_use?n("v-uni-view",{staticClass:"bnt gray"},[t._v("已领取")]):2==e.is_use?n("v-uni-view",{staticClass:"bnt gray"},[t._v("已领完")]):n("v-uni-view",{staticClass:"bnt bg-color",on:{click:function(n){arguments[0]=n=t.$handleEvent(n),t.getCoupon(e.id,i)}}},[t._v("立即领取")])],1)],1)],1)})),1):t._e(),t.couponsList.length?n("v-uni-view",{staticClass:"loadingicon acea-row row-center-wrapper"},[n("v-uni-text",{staticClass:"loading iconfont icon-jiazai",attrs:{hidden:0==t.loading}}),t._v(t._s(t.loadTitle))],1):t.couponsList.length||1!=t.loading?t._e():n("v-uni-view",{staticClass:"noCommodity"},[n("v-uni-view",{staticClass:"pictrue"},[n("v-uni-image",{attrs:{src:t.domain+"/static/images/noCoupon.png"}})],1)],1)],1)},o=[]},ebab:function(t,e,n){"use strict";n("6a54"),Object.defineProperty(e,"__esModule",{value:!0}),e.default=void 0;var i=n("02aa"),o=n("8f59"),u=n("aa10"),a=n("e44d"),s={components:{},data:function(){return{domain:u.HTTP_REQUEST_URL,couponsList:[],loading:!1,loadend:!1,loadTitle:"加载更多",page:1,limit:20}},computed:(0,o.mapGetters)(["isLogin"]),onLoad:function(){this.isLogin?this.getUseCoupons():(0,a.toLogin)()},onReachBottom:function(){this.getUseCoupons()},methods:{getCoupon:function(t,e){var n=this,o=n.couponsList;(0,i.setCouponReceive)(t).then((function(t){o[e].is_use=!0,n.$set(n,"couponsList",o),n.$util.Tips({title:"领取成功"})}),(function(t){return n.$util.Tips({title:t.message})}))},getUseCoupons:function(){var t=this;return!this.loadend&&(!this.loading&&void(0,i.getCoupons)({page:t.page,limit:t.limit}).then((function(e){var n=e.data,i=n.length<t.limit,o=t.$util.SplitArray(n,t.couponsList);t.$set(t,"couponsList",o),t.loadend=i,t.loadTitle=i?"我也是有底线的":"加载更多",t.page=t.page+1,t.loading=!1})).catch((function(e){t.loading=!1,t.loadTitle="加载更多"})))}}};e.default=s}}]);