You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
1 line
4.0 KiB
1 line
4.0 KiB
4 months ago
|
require('../common/vendor.js');(global["webpackJsonp"]=global["webpackJsonp"]||[]).push([["pages/users/user_coupon/index"],{6982:function(t,o,n){"use strict";n.r(o);var e=n("9576"),i=n.n(e);for(var s in e)["default"].indexOf(s)<0&&function(t){n.d(o,t,(function(){return e[t]}))}(s);o["default"]=i.a},9576:function(t,o,n){"use strict";(function(t){var e=n("47a9");Object.defineProperty(o,"__esModule",{value:!0}),o.default=void 0;var i=n("a230"),s=n("7ba4"),a=n("8f59"),u=e(n("cef6")),c=n("bad7"),d={components:{emptyPage:function(){n.e("components/emptyPage").then(function(){return resolve(n("bc18"))}.bind(null,n)).catch(n.oe)}},mixins:[u.default],data:function(){return{couponsList:[],loading:!1,isAuto:!1,isShowAuth:!1,navOn:0,type:"",page:1,limit:15,finished:!1,imgHost:c.HTTP_REQUEST_URL,expired:0,not_used:0,used:0,shadeRight:!0,shadeLeft:!0}},computed:(0,a.mapGetters)(["isLogin"]),watch:{isLogin:{handler:function(t,o){},deep:!0}},onLoad:function(){this.isLogin?(this.getCouponsNum(),this.getUseCoupons()):(0,s.toLogin)()},onShow:function(){t.removeStorageSync("form_type_cart")},onReachBottom:function(){this.getUseCoupons()},methods:{getCouponsNum:function(){var t=this;(0,i.getCouponsNum)().then((function(o){t.used=o.data.used,t.not_used=o.data.not_used,t.expired=o.data.expired}))},onNav:function(t){this.navOn=t,this.onSubNav("")},onSubNav:function(t){this.type=t,this.couponsList=[],this.page=1,this.finished=!1,this.getUseCoupons()},useCoupon:function(o){var n="";if(0==o.category_id&&""==o.product_id&&0==o.brand_id&&(n="/pages/goods/goods_list/index?title=默认"),0!=o.category_id&&(n=1==o.category_type?"/pages/goods/goods_list/index?cid="+o.category_id+"&title="+o.category_name:"/pages/goods/goods_list/index?sid="+o.category_id+"&title="+o.category_name),""!=o.product_id){var e=o.product_id.split(","),i=e.length;n=1==i?"/pages/goods_details/index?id="+o.product_id:"/pages/goods/goods_list/index?productId="+o.product_id+"&title=默认"}0!=o.brand_id&&(n="/pages/goods/goods_list/index?brandId="+o.brand_id+"&title=默认"),t.navigateTo({url:n})},onLoadFun:function(){this.getUseCoupons(),this.isShowAuth=!1},authColse:function(t){this.isShowAuth=t},getUseCoupons:function(){var o=this;o.loading||o.finished||(o.loading=!0,t.showLoading({title:"正在加载…"}),(0,i.getUserCoupons)(this.navOn,{type:this.type,page:this.page,limit:this.limit}).then((function(n){o.loading=!1,t.hideLoading(),n.data.forEach((function(t){t.ruleShow=!1,t.rules=t.rule?t.rule.split("\n"):[]})),o.couponsList=o.couponsList.concat(n.data),o.finished=n.data.length<o.limit,o.page+=1})).catch((function(n){o.loading=!1,t.showToast({title:n,icon:"none"})})))},openRule:function(t){this.couponsList[t].ruleShow=!this.couponsList[t].ruleShow},scrolltolower:function(){var t=this;this.$nextTick((function(){t.shadeRight=!1}))},scrolltoupper:function(){var t=this;this.$nextTick((function(){t.shadeLeft=!1}))},scroll:function(t){var o=this;this.$nextTick((function(){o.shadeRight=!0,o.shadeLeft=!0}))}}};o.default=d}).call(this,n("df3c")["default"])},"9ae1":function(t,o,n){"use strict";(function(t,o){var e=n("47a9");n("7561");e(n("3240"));var i=e(n("ed16"));t.__webpack_require_UNI_MP_PLUGIN__=n,o(i.default)}).call(this,n("3223")["default"],n("df3c")["createPage"])},"9ff9":function(t,o,n){},e34a:function(t,o,n){"use strict";var e=n("9ff9"),i=n.n(e);i.a},ed16:function(t,o,n){"use strict";n.r(o);var e=n("f8c1"),i=n("6982");for(var s in i)["default"].indexOf(s)<0&&function(t){n.d(o,t,(function(){return i[t]}))}(s);n("e34a");var a=n("828b"),u=Object(a["a"])(i["default"],e["b"],e["c"],!1,null,"44106f3e",null,!1,e["a"],void 0);o["default"]=u.exports},f8c1:function(t,o,n){"use strict";n.d(o,"b",(function(){return e})),n.d(o,"c",(function(){return i})),n.d(o,"a",(function(){}));var e=function(){var t=this,o=t.$createElement,n=(t._self._c,t.__map(t.couponsList,(function(o,n){var e=t.__get_orig(o),i=1!=o.coupon_type&&2==o.coupon_type?parseFloat(o.coupon_price):null;return{$orig:e,m0:i}}))),e=!t.couponsList.length&&!t.loading;t.$mp.data=Object.assign({},{$root:{l0:n,g0:e}})},i=[]}},[["9ae
|