| 1 |
- (global["webpackJsonp"]=global["webpackJsonp"]||[]).push([["pages/coupons/coupons"],{"0340":function(t,e,o){},4344:function(t,e,o){"use strict";o.r(e);var a=o("f666"),n=o.n(a);for(var u in a)["default"].indexOf(u)<0&&function(t){o.d(e,t,(function(){return a[t]}))}(u);e["default"]=n.a},"7cf7":function(t,e,o){"use strict";var a=o("0340"),n=o.n(a);n.a},"8d63":function(t,e,o){"use strict";(function(t,e){var a=o("47a9");o("6a42");a(o("3240"));var n=a(o("d444"));t.__webpack_require_UNI_MP_PLUGIN__=o,e(n.default)}).call(this,o("3223")["default"],o("df3c")["createPage"])},"9d4d":function(t,e,o){"use strict";o.d(e,"b",(function(){return n})),o.d(e,"c",(function(){return u})),o.d(e,"a",(function(){return a}));var a={axBody:function(){return o.e("components/ax-body/ax-body").then(o.bind(null,"e199"))}},n=function(){var t=this.$createElement,e=(this._self._c,this.toBeclaimedCoupons.length);this.$mp.data=Object.assign({},{$root:{g0:e}})},u=[]},d444:function(t,e,o){"use strict";o.r(e);var a=o("9d4d"),n=o("4344");for(var u in n)["default"].indexOf(u)<0&&function(t){o.d(e,t,(function(){return n[t]}))}(u);o("7cf7");var i=o("828b"),s=Object(i["a"])(n["default"],a["b"],a["c"],!1,null,null,null,!1,a["a"],void 0);e["default"]=s.exports},f666:function(t,e,o){"use strict";(function(t){var a=o("47a9");Object.defineProperty(e,"__esModule",{value:!0}),e.default=void 0;var n=a(o("af34")),u={data:function(){return{coupons_card:"https://hyxhsh.oss-cn-chengdu.aliyuncs.com/63b7c68b71a69169d1b33f92/store/bdb/user/avatar/bNfT8BQFvtcead404bdf22856fe1306af8fbb672a74c.png/1.png",couponsBg:"https://charge.hub.zswlgz.com/apifile//2025/12/09/YXVyOk6RqkKi2a5b93800594ecafd15e6599498e7e90_20251209095058A002.png",currentIndex:0,tabsList:[{text:"待领取",id:0,count:0},{text:"待使用",id:1,count:0},{text:"已使用",id:2,count:0},{text:"已过期",id:3,count:0}],toBeclaimedCoupons:[],totalNumber:0,form_submit:{pageNum:1,pageSize:10,status:1}}},onLoad:function(){this.get_statistical()},onReachBottom:function(t){this.form_submit.pageNum++,this.totalNumber>this.toBeclaimedCoupons.length&&this.get_TobeclaimedCoupons()},mounted:function(){this.get_TobeclaimedCoupons()},methods:{handleTabClick:function(t){this.currentIndex=t.id,this.form_submit.status=t.id,this.toBeclaimedCoupons=[],this.get_TobeclaimedCoupons()},get_TobeclaimedCoupons:function(){var t=this;0==this.currentIndex?this.$api.base("get","/applet/v1/user/getCouponTemplatePage",{pageNum:this.form_submit.pageNum,pageSize:this.form_submit.pageSize,status:this.form_submit.status},{}).then((function(e){t.toBeclaimedCoupons=e.data.records,t.tabsList[0].count=e.data.total})):this.$api.base("post","/applet/v1/user/getCouponPage",{pageNum:this.form_submit.pageNum,pageSize:this.form_submit.pageSize,status:this.form_submit.status},{}).then((function(e){t.totalNumber=e.total,1==t.form_submit.pageNum?t.toBeclaimedCoupons=e.data.records:t.toBeclaimedCoupons=[].concat((0,n.default)(t.toBeclaimedCoupons),(0,n.default)(e.data.records))}))},get_statistical:function(){var t=this;this.$api.base("get","/applet/v1/user/getCouponStatusNum",{},{}).then((function(e){t.tabsList[1].count=e.data.unusedNum,t.tabsList[2].count=e.data.usedNum,t.tabsList[3].count=e.data.expiredNum}))},goto_orderDetail:function(e){t.navigateTo({url:"/pages/order-detail/order-detail?orderId=".concat(e.useOrderId)})},get_coupons:function(e){var o=this;if(e.dayReceiveCount>e.totalCount)return this.$app.popup.toast("您来慢了~该优惠券已被领完");t.showLoading({mask:!0});var a=setInterval((function(){clearInterval(a),o.$api.base("post","/applet/v1/user/gainCoupon",{couponCode:e.code},{}).then((function(e){t.hideLoading(),0==e.code&&(o.get_statistical(),o.get_TobeclaimedCoupons(),o.$app.popup.toast("领取成功"))}))}),100)}}};e.default=u}).call(this,o("df3c")["default"])}},[["8d63","common/runtime","common/vendor"]]]);
|