(global["webpackJsonp"]=global["webpackJsonp"]||[]).push([["user/page/myCoupon"],{"22d3":function(e,n,t){"use strict";var o=t("a38f"),i=t.n(o);i.a},5992:function(e,n,t){"use strict";t.d(n,"b",(function(){return i})),t.d(n,"c",(function(){return a})),t.d(n,"a",(function(){return o}));var o={uniLoadMore:function(){return t.e("components/uni-load-more/uni-load-more").then(t.bind(null,"bfdb"))}},i=function(){var e=this,n=e.$createElement,t=(e._self._c,e.__map(e.navList,(function(n,t){var o=e.__get_orig(n),i=!0===n.loaded&&0===n.orderList.length;return{$orig:o,g0:i}})));e.$mp.data=Object.assign({},{$root:{l0:t}})},a=[]},"889d":function(e,n,t){"use strict";(function(e,n){var o=t("4ea4");t("12d5");o(t("66fd"));var i=o(t("b0c9"));e.__webpack_require_UNI_MP_PLUGIN__=t,n(i.default)}).call(this,t("bc2e")["default"],t("543d")["createPage"])},a38f:function(e,n,t){},b0c9:function(e,n,t){"use strict";t.r(n);var o=t("5992"),i=t("d4da");for(var a in i)["default"].indexOf(a)<0&&function(e){t.d(n,e,(function(){return i[e]}))}(a);t("22d3");var r=t("f0c5"),u=Object(r["a"])(i["default"],o["b"],o["c"],!1,null,null,null,!1,o["a"],void 0);n["default"]=u.exports},b954:function(e,n,t){"use strict";(function(e){Object.defineProperty(n,"__esModule",{value:!0}),n.default=void 0;var o=t("1b3d"),i={components:{uniLoadMore:function(){t.e("components/uni-load-more/uni-load-more").then(function(){return resolve(t("bfdb"))}.bind(null,t)).catch(t.oe)},empty:function(){t.e("components/empty").then(function(){return resolve(t("be9e"))}.bind(null,t)).catch(t.oe)}},data:function(){return{height:"",tabCurrentIndex:0,navList:[{state:0,text:"全部",loadingType:"more",orderList:[],page:1,limit:10,loaded:!1},{state:1,text:"未使用",loadingType:"more",orderList:[],page:1,limit:10,loaded:!1},{state:2,text:"已使用",loadingType:"more",orderList:[],page:1,limit:10,loaded:!1}]}},onLoad:function(){this.getMyCoupons()},onShow:function(){},onReachBottom:function(){},onReady:function(){var n=this;e.getSystemInfo({success:function(t){var o=e.createSelectorQuery();o.select(".swiper-box").boundingClientRect(),o.exec((function(e){n.height=t.windowHeight-e[0].top+"px"}))},fail:function(e){}})},methods:{navTo:function(n){console.log(n);var t=getCurrentPages();console.log(t,"pages");var o=t[t.length-2];console.log(o,"pages2"),e.navigateTo({url:n})},getMyCoupons:function(n){var t=this,i=this.tabCurrentIndex,a=this.navList[i];"tab"==n&&a.loaded||"noMore"!=a.loadingType&&"loading"!=a.loadingType&&(a.loadingType="loading",(0,o.getCouponsList)({pages:a.page,limit:a.limit},a.state).then((function(n){var o=n.data,i=o.map((function(e){return e.coupon_price=+e.coupon_price.replace(",",""),e.use_min_price=+e.use_min_price.replace(",",""),e}));a.orderList=a.orderList.concat(i),console.log(a.orderList),a.page++,a.limit!=o.length?(a.loadingType="noMore",e.hideLoading(),t.$set(a,"loaded",!0)):a.loadingType="more"})))},tabClick:function(e){this.tabCurrentIndex=e,this.getMyCoupons()},changeTab:function(e){console.log(e,"eeeeeeeeeeeeeeeeee"),e.target.current>this.navList.length-1?this.tabCurrentIndex=0:this.tabCurrentIndex=e.target.current}}};n.default=i}).call(this,t("543d")["default"])},d4da:function(e,n,t){"use strict";t.r(n);var o=t("b954"),i=t.n(o);for(var a in o)["default"].indexOf(a)<0&&function(e){t.d(n,e,(function(){return o[e]}))}(a);n["default"]=i.a}},[["889d","common/runtime","common/vendor"]]]);