require('../common/vendor.js');(global["webpackJsonp"]=global["webpackJsonp"]||[]).push([["pages/users/user_coupon/index"],{4546:function(t,n,e){"use strict";(function(t){Object.defineProperty(n,"__esModule",{value:!0}),n.default=void 0;var o=e("3c22"),i=e("cef1"),a=e("8f59"),u=getApp(),s={data:function(){return{urlDomain:this.$Cache.get("imgHost"),couponsList:[],loading:!1,loadend:!1,loadTitle:"加载更多",page:1,limit:20,navOn:"usable",theme:u.globalData.theme}},computed:(0,a.mapGetters)(["isLogin"]),watch:{isLogin:{handler:function(t,n){t&&this.getUseCoupons()},deep:!0}},onLoad:function(){this.isLogin?this.getUseCoupons():(0,i.toLogin)()},methods:{goCouponsProList:function(n){"usable"===this.navOn&&t.navigateTo({url:"/pages/goods/coupon_goods_list/index?type=2&userCouponId=".concat(n.id,"&money=").concat(n.money,"&minPrice=").concat(n.minPrice,"&isUserReceive=true")})},onNav:function(t){this.navOn=t,this.couponsList=[],this.page=1,this.loadend=!1,this.getUseCoupons()},getUseCoupons:function(){var t=this;return!this.loadend&&(!this.loading&&(this.loading=!0,void(0,o.getUserCoupons)({page:t.page,limit:t.limit,type:t.navOn}).then((function(n){var e=n.data?n.data.list:[],o=e.length<t.limit,i=t.$util.SplitArray(e,t.couponsList);t.$set(t,"couponsList",i),t.loadend=o,t.loadTitle=o?"到底了~~":"加载更多",t.page=t.page+1,t.loading=!1})).catch((function(n){t.loading=!1,t.loadTitle="加载更多"}))))}},onReachBottom:function(){this.getUseCoupons()}};n.default=s}).call(this,e("df3c")["default"])},"72d9":function(t,n,e){"use strict";e.r(n);var o=e("8ede"),i=e("fed7");for(var a in i)["default"].indexOf(a)<0&&function(t){e.d(n,t,(function(){return i[t]}))}(a);e("eac6");var u=e("828b"),s=Object(u["a"])(i["default"],o["b"],o["c"],!1,null,"396faea8",null,!1,o["a"],void 0);n["default"]=s.exports},"8ede":function(t,n,e){"use strict";e.d(n,"b",(function(){return o})),e.d(n,"c",(function(){return i})),e.d(n,"a",(function(){}));var o=function(){var t=this,n=t.$createElement,e=(t._self._c,t.couponsList.length),o=e?t.__map(t.couponsList,(function(n,e){var o=t.__get_orig(n),i=n.money?Number(n.money):null,a=Number(n.minPrice),u=t._f("couponTypeFilter")(n.category),s=n.startTime&&n.endTime&&"usable"===t.navOn?t.$util.getCouponTime(n.startTime,n.endTime):null;return{$orig:o,m0:i,m1:a,f0:u,g1:s}})):null,i=t.couponsList.length,a=!t.couponsList.length&&!t.loading;t.$mp.data=Object.assign({},{$root:{g0:e,l0:o,g2:i,g3:a}})},i=[]},d9da:function(t,n,e){},eac6:function(t,n,e){"use strict";var o=e("d9da"),i=e.n(o);i.a},f5c6:function(t,n,e){"use strict";(function(t,n){var o=e("47a9");e("1d3c");o(e("3240"));var i=o(e("72d9"));t.__webpack_require_UNI_MP_PLUGIN__=e,n(i.default)}).call(this,e("3223")["default"],e("df3c")["createPage"])},fed7:function(t,n,e){"use strict";e.r(n);var o=e("4546"),i=e.n(o);for(var a in o)["default"].indexOf(a)<0&&function(t){e.d(n,t,(function(){return o[t]}))}(a);n["default"]=i.a}},[["f5c6","common/runtime","common/vendor"]]]);