coupon.js 3.3 KB

1
  1. require('../../common/vendor.js');(global["webpackJsonp"]=global["webpackJsonp"]||[]).push([["bundle/pages/coupon/coupon"],{2403:function(t,e,n){"use strict";var i=n("c812"),o=n.n(i);o.a},"3a9a":function(t,e,n){"use strict";n.d(e,"b",(function(){return o})),n.d(e,"c",(function(){return a})),n.d(e,"a",(function(){return i}));var i={uTabs:function(){return n.e("components/uview-ui/components/u-tabs/u-tabs").then(n.bind(null,"6470"))},mescrollUni:function(){return Promise.all([n.e("common/vendor"),n.e("components/mescroll-uni/mescroll-uni")]).then(n.bind(null,"01b6"))},couponCard:function(){return n.e("components/coupon-card/coupon-card").then(n.bind(null,"5763"))}},o=function(){var t=this,e=t.$createElement,n=(t._self._c,t.__map(t.lists,(function(e,n){var i=t.__get_orig(e),o=!0===e.isShow?t.__map(t.list,(function(e,n){var i=t.__get_orig(e),o={title:"使用说明",content:[e.tips]},a={name:t.getBtn,theme:"去使用"==t.getBtn?"primary":"disable"};return{$orig:i,a0:o,a1:a}})):null;return{$orig:i,l0:o}})));t.$mp.data=Object.assign({},{$root:{l1:n}})},a=[]},"7b30":function(t,e,n){"use strict";n.r(e);var i=n("f903"),o=n.n(i);for(var a in i)["default"].indexOf(a)<0&&function(t){n.d(e,t,(function(){return i[t]}))}(a);e["default"]=o.a},"9b93":function(t,e,n){"use strict";n.r(e);var i=n("3a9a"),o=n("7b30");for(var a in o)["default"].indexOf(a)<0&&function(t){n.d(e,t,(function(){return o[t]}))}(a);n("2403");var s=n("828b"),c=Object(s["a"])(o["default"],i["b"],i["c"],!1,null,null,null,!1,i["a"],void 0);e["default"]=c.exports},c586:function(t,e,n){"use strict";(function(t,e){var i=n("47a9");n("b46f");i(n("3240"));var o=i(n("9b93"));t.__webpack_require_UNI_MP_PLUGIN__=n,e(o.default)}).call(this,n("3223")["default"],n("df3c")["createPage"])},c812:function(t,e,n){t.exports={red_theme:"#FF2C3C",orange_theme:"#f7971e",pink_theme:"#fa444d",gold_theme:"#e0a356",blue_theme:"#2f80ed",green_theme:"#2ec840"}},f903:function(t,e,n){"use strict";(function(t){var i=n("47a9");Object.defineProperty(e,"__esModule",{value:!0}),e.default=void 0;var o=i(n("2bc2")),a=n("1815"),s={mixins:[o.default],data:function(){return{lists:[{tabsName:"可使用(0)",isShow:!0,type:0},{tabsName:"已使用(0)",isShow:!1,type:1},{tabsName:"已过期(0)",isShow:!1,type:2}],current:0,list:[],extend:{},showTips:[],upOption:{auto:!1,noMoreSize:4,empty:{icon:"/static/images/empty/coupon.png",tip:"暂无优惠券数据",fixed:!0,top:"200rpx"}}}},computed:{getBtn:function(){var t="";switch(this.lists[this.current].type){case 0:t="去使用";break;case 1:t="已使用";break;case 2:t="已过期";break}return t}},methods:{change:function(t){for(var e=0;e<this.lists.length;e++)this.lists[e].isShow=!1;this.current=t,this.lists[t].isShow=!0},upCallback:function(t){var e=this,n=t.num,i=t.size;(0,a.apiCouponGet)({status:this.lists[this.current].type,page_no:n,page_size:i}).then((function(t){e.lists[0].tabsName="可使用(".concat(t.extend.normal,")"),e.lists[1].tabsName="已使用(".concat(t.extend.use,")"),e.lists[2].tabsName="已过期(".concat(t.extend.invalid,")"),1==n&&(e.list=[]),e.list=e.list.concat(t.lists),e.mescroll.endSuccess(t.lists.length,t.count)})).catch((function(t){e.mescroll.endErr()}))},getCoupon:function(){0==this.current&&t.reLaunch({url:"/pages/index/index"})}}};e.default=s}).call(this,n("df3c")["default"])}},[["c586","common/runtime","common/vendor"]]]);