| 1 |
- require('../common/vendor.js');(global["webpackJsonp"]=global["webpackJsonp"]||[]).push([["pages/users/user_coupon/index"],{1848:function(t,n,o){"use strict";o.r(n);var e=o("c22c"),i=o.n(e);for(var a in e)["default"].indexOf(a)<0&&function(t){o.d(n,t,(function(){return e[t]}))}(a);n["default"]=i.a},"1e9d":function(t,n,o){},"7cb6":function(t,n,o){},"8bf2":function(t,n,o){"use strict";(function(t,n){var e=o("47a9");o("2ea2");e(o("3240"));var i=e(o("d77a"));t.__webpack_require_UNI_MP_PLUGIN__=o,n(i.default)}).call(this,o("3223")["default"],o("df3c")["createPage"])},a220:function(t,n,o){"use strict";var e=o("1e9d"),i=o.n(e);i.a},ad02:function(t,n,o){"use strict";o.d(n,"b",(function(){return e})),o.d(n,"c",(function(){return i})),o.d(n,"a",(function(){}));var e=function(){var t=this,n=t.$createElement,o=(t._self._c,t.$t("未使用")),e=t.$t("已使用/过期"),i=t.couponsList.length,a=i?t.__map(t.couponsList,(function(n,o){var e=t.__get_orig(n),i=t.$t("¥"),a=n.use_min_price>0?t.$t("满"):null,s=n.use_min_price>0?t.$t("元可用"):null,u=n.use_min_price>0?null:t.$t("无门槛券"),c=0===n.applicable_type?t.$t("通用劵"):null,l=0!==n.applicable_type&&1===n.applicable_type?t.$t("品类券"):null,d=0!==n.applicable_type&&1!==n.applicable_type?t.$t("商品券"):null,r=t.$t(n.coupon_title),p=0==n._type?t.$t(n._msg):null,f=0!=n._type?t.$t(n._msg):null;return{$orig:e,m2:i,m3:a,m4:s,m5:u,m6:c,m7:l,m8:d,m9:r,m10:p,m11:f}})):null,s=!t.couponsList.length&&2===t.page;t.$mp.data=Object.assign({},{$root:{m0:o,m1:e,g0:i,l0:a,g1:s}})},i=[]},c22c:function(t,n,o){"use strict";(function(t){var e=o("47a9");Object.defineProperty(n,"__esModule",{value:!0}),n.default=void 0;var i=o("d369"),a=o("d7f8"),s=o("8f59"),u=e(o("0cf0")),c=o("9ad6"),l={components:{authorize:function(){o.e("components/Authorize").then(function(){return resolve(o("636c"))}.bind(null,o)).catch(o.oe)},home:function(){Promise.all([o.e("common/vendor"),o.e("components/home/index")]).then(function(){return resolve(o("05b1"))}.bind(null,o)).catch(o.oe)}},mixins:[u.default],data:function(){return{imgHost:c.HTTP_REQUEST_URL,couponsList:[],loading:!1,isAuto:!1,isShowAuth:!1,navOn:1,page:1,limit:15,finished:!1}},computed:(0,s.mapGetters)(["isLogin"]),watch:{isLogin:{handler:function(t,n){t&&this.getUseCoupons()},deep:!0}},onLoad:function(){this.isLogin?this.getUseCoupons():(0,a.toLogin)()},onReachBottom:function(){this.getUseCoupons()},methods:{onNav:function(t){this.navOn=t,this.couponsList=[],this.page=1,this.finished=!1,this.getUseCoupons()},useCoupon:function(n){if(2!=this.navOn){var o="";if(0==n.category_id&&""==n.product_id&&(o="/pages/goods/goods_list/index?title=默认"),0!=n.category_id&&(o="/pages/goods/goods_list/index?title=".concat(n.coupon_title,"&coupon_category_id=").concat(n.category_id)),""!=n.product_id){var e=n.product_id.split(","),i=e.length;o=1==i?"/pages/goods_details/index?id="+n.product_id:"/pages/goods/goods_list/index?productId="+n.product_id+"&title=默认"}t.navigateTo({url:o})}},onLoadFun:function(){this.getUseCoupons()},authColse:function(t){this.isShowAuth=t},getUseCoupons:function(){var n=this;n.loading||n.finished||(n.loading=!0,t.showLoading({title:n.$t("正在加载…")}),(0,i.getUserCoupons)(this.navOn,{page:this.page,limit:this.limit}).then((function(o){n.loading=!1,t.hideLoading(),n.couponsList=n.couponsList.concat(o.data),n.finished=o.data.length<n.limit,n.page+=1})).catch((function(o){n.loading=!1,t.showToast({title:o,icon:"none"})})))}}};n.default=l}).call(this,o("df3c")["default"])},d77a:function(t,n,o){"use strict";o.r(n);var e=o("ad02"),i=o("1848");for(var a in i)["default"].indexOf(a)<0&&function(t){o.d(n,t,(function(){return i[t]}))}(a);o("a220"),o("e68c");var s=o("828b"),u=Object(s["a"])(i["default"],e["b"],e["c"],!1,null,"61be9468",null,!1,e["a"],void 0);n["default"]=u.exports},e68c:function(t,n,o){"use strict";var e=o("7cb6"),i=o.n(e);i.a}},[["8bf2","common/runtime","common/vendor"]]]);
|