(global["webpackJsonp"]=global["webpackJsonp"]||[]).push([["user/page/myCoupon"],{"064b":function(e,n,t){},"477b":function(e,n,t){"use strict";t.r(n);var o=t("ce70"),i=t.n(o);for(var r in o)"default"!==r&&function(e){t.d(n,e,(function(){return o[e]}))}(r);n["default"]=i.a},"4f81":function(e,n,t){"use strict";t.r(n);var o=t("9262"),i=t("477b");for(var r in i)"default"!==r&&function(e){t.d(n,e,(function(){return i[e]}))}(r);t("6e2b");var a,u=t("f0c5"),c=Object(u["a"])(i["default"],o["b"],o["c"],!1,null,null,null,!1,o["a"],a);n["default"]=c.exports},"6e2b":function(e,n,t){"use strict";var o=t("064b"),i=t.n(o);i.a},9262:function(e,n,t){"use strict";t.d(n,"b",(function(){return i})),t.d(n,"c",(function(){return r})),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,"ef69"))}},i=function(){var e=this,n=e.$createElement;e._self._c},r=[]},ce70:function(e,n,t){"use strict";(function(e){Object.defineProperty(n,"__esModule",{value:!0}),n.default=void 0;var o=t("62c8"),i=function(){t.e("components/uni-load-more/uni-load-more").then(function(){return resolve(t("ef69"))}.bind(null,t)).catch(t.oe)},r=function(){t.e("components/empty").then(function(){return resolve(t("fdb6"))}.bind(null,t)).catch(t.oe)},a={components:{uniLoadMore:i,empty:r},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,r=i.tabCurrentIndex,a=i.navList[r];"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=a}).call(this,t("543d")["default"])},f2e4:function(e,n,t){"use strict";(function(e){t("856e");o(t("66fd"));var n=o(t("4f81"));function o(e){return e&&e.__esModule?e:{default:e}}wx.__webpack_require_UNI_MP_PLUGIN__=t,e(n.default)}).call(this,t("543d")["createPage"])}},[["f2e4","common/runtime","common/vendor"]]]);