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 lines
5.2 KiB
1 lines
5.2 KiB
(global["webpackJsonp"]=global["webpackJsonp"]||[]).push([["pages/activity/coupon/index"],{"2ee5":function(t,e,r){"use strict";var n=r("ff7f"),i=r.n(n);i.a},"50d6":function(t,e,r){"use strict";(function(t,e){var n=r("47a9");r("7561");n(r("3240"));var i=n(r("b596"));t.__webpack_require_UNI_MP_PLUGIN__=r,e(i.default)}).call(this,r("3223")["default"],r("df3c")["createPage"])},b596:function(t,e,r){"use strict";r.r(e);var n=r("ba78"),i=r("e3be");for(var a in i)["default"].indexOf(a)<0&&function(t){r.d(e,t,(function(){return i[t]}))}(a);r("2ee5");var o=r("828b"),s=Object(o["a"])(i["default"],n["b"],n["c"],!1,null,"682cd248",null,!1,n["a"],void 0);e["default"]=s.exports},ba78:function(t,e,r){"use strict";r.d(e,"b",(function(){return i})),r.d(e,"c",(function(){return a})),r.d(e,"a",(function(){return n}));var n={easyLoadimage:function(){return r.e("components/easy-loadimage/easy-loadimage").then(r.bind(null,"a9c6"))}},i=function(){var t=this,e=t.$createElement,r=(t._self._c,t.couponsList.length),n=r?t.__map(t.couponsList,(function(e,r){var n=t.__get_orig(e),i=t._f("typeFilter")(e.type),a=1!=e.coupon_type?parseFloat(e.coupon_price):null;return{$orig:n,f0:i,m0:a}})):null,i=t.couponsList.length,a=t.couponsList.length;t._isMounted||(t.e0=function(e){t.showDrop=!t.showDrop},t.e1=function(e){t.showDrop=!1}),t.$mp.data=Object.assign({},{$root:{g0:r,l0:n,g1:i,g2:a}})},a=[]},bd50:function(t,e,r){"use strict";(function(t){var n=r("47a9");Object.defineProperty(e,"__esModule",{value:!0}),e.default=void 0;var i=n(r("7ca3")),a=r("a230"),o=r("7ba4"),s=r("8f59"),c=n(r("cef6")),u=r("bad7");function p(t,e){var r=Object.keys(t);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(t);e&&(n=n.filter((function(e){return Object.getOwnPropertyDescriptor(t,e).enumerable}))),r.push.apply(r,n)}return r}function l(t){for(var e=1;e<arguments.length;e++){var r=null!=arguments[e]?arguments[e]:{};e%2?p(Object(r),!0).forEach((function(e){(0,i.default)(t,e,r[e])})):Object.getOwnPropertyDescriptors?Object.defineProperties(t,Object.getOwnPropertyDescriptors(r)):p(Object(r)).forEach((function(e){Object.defineProperty(t,e,Object.getOwnPropertyDescriptor(r,e))}))}return t}var d=t.getSystemInfoSync().statusBarHeight,f={mixins:[c.default],components:{emptyPage:function(){r.e("components/emptyPage").then(function(){return resolve(r("bc18"))}.bind(null,r)).catch(r.oe)}},data:function(){return{sysHeight:d,couponsList:[],loading:!1,loadend:!1,loadTitle:"加载更多",params:{page:1,limit:20,type:"",defaultOrder:1,timeOrder:"",priceOrder:""},isAuto:!1,isShowAuth:!1,navList:[{name:"快过期",type:-1},{name:"通用券",type:0},{name:"品类券",type:1},{name:"商品券",type:2},{name:"品牌券",type:3}],count:0,imgHost:u.HTTP_REQUEST_URL,pageScrollStatus:!1,showDrop:!1,current:0,price:0}},computed:l(l({},(0,s.mapGetters)(["isLogin"])),{},{headerBg:function(){return"linear-gradient(90deg, var(--view-gradient) 0%, var(--view-theme) 100%)"}}),filters:{typeFilter:function(t){return{0:"通用券",1:"品类券",2:"商品券",3:"品牌券"}[t]}},onPageScroll:function(e){e.scrollTop>130?this.pageScrollStatus=!0:e.scrollTop<130&&(this.pageScrollStatus=!1),t.$emit("scroll")},onLoad:function(){this.isLogin?this.getUseCoupons():(0,o.toLogin)()},onReachBottom:function(){this.getUseCoupons()},methods:{changeTab:function(t){this.current=t,0==t?(this.params.defaultOrder=1,this.params.timeOrder="",this.params.priceOrder=""):1==t?(""==this.params.timeOrder?this.params.timeOrder="asc":"asc"==this.params.timeOrder?this.params.timeOrder="desc":"desc"==this.params.timeOrder&&(this.params.timeOrder=""),this.params.defaultOrder="",this.params.priceOrder=""):2==t&&(""==this.params.priceOrder?this.params.priceOrder="asc":"asc"==this.params.priceOrder?this.params.priceOrder="desc":"desc"==this.params.priceOrder&&(this.params.priceOrder=""),this.params.defaultOrder="",this.params.timeOrder=""),this.params.page=1,this.couponsList=[],this.loadend=!1,this.loading=!1,this.getUseCoupons()},toggleRule:function(t){t.ruleShow=!t.ruleShow},backPage:function(){t.navigateBack()},goDetails:function(e){t.navigateTo({url:"/pages/goods_details/index?id="+e.id})},getCoupon:function(t,e){var r=this,n=r.couponsList;(0,a.setCouponReceive)(t).then((function(t){n[e].is_use=!0,r.$set(r,"couponsList",n),r.$util.Tips({title:"领取成功"})})).catch((function(t){return r.$util.Tips({title:t})}))},getUseCoupons:function(){var t=this,e=this;return!this.loadend&&(!this.loading&&(e.loading=!0,e.loadTitle="加载更多",void(0,a.getCoupons)(this.params).then((function(r){var n=r.data.list,i=n.length<e.params.limit;n.map((function(e){t.$set(e,"ruleShow",!1)}));var a=e.$util.SplitArray(n,e.couponsList);e.$set(e,"couponsList",a),e.loadend=i,e.loading=!1,e.loadTitle=i?"没有更多内容啦~":"加载更多",e.params.page++})).catch((function(t){e.loading=!1,e.loadTitle="加载更多"}))))},setType:function(t){this.params.type!==t&&(this.params.type=t,this.couponsList=[],this.params.page=1,this.loadend=!1,this.showDrop=!1,this.getUseCoupons())}}};e.default=f}).call(this,r("df3c")["default"])},e3be:function(t,e,r){"use strict";r.r(e);var n=r("bd50"),i=r.n(n);for(var a in n)["default"].indexOf(a)<0&&function(t){r.d(e,t,(function(){return n[t]}))}(a);e["default"]=i.a},ff7f:function(t,e,r){}},[["50d6","common/runtime","common/vendor"]]]); |