(global["webpackJsonp"]=global["webpackJsonp"]||[]).push([["pages/user/coupon"],{"352a":function(n,e,t){"use strict";(function(n,e){var a=t("4ea4");t("d1cd");a(t("66fd"));var o=a(t("4be1"));n.__webpack_require_UNI_MP_PLUGIN__=t,e(o.default)}).call(this,t("bc2e")["default"],t("543d")["createPage"])},"4a61":function(n,e,t){},"4be1":function(n,e,t){"use strict";t.r(e);var a=t("580a"),o=t("cf4b");for(var i in o)["default"].indexOf(i)<0&&function(n){t.d(e,n,(function(){return o[n]}))}(i);t("a8dc");var r=t("f0c5"),c=Object(r["a"])(o["default"],a["b"],a["c"],!1,null,null,null,!1,a["a"],void 0);e["default"]=c.exports},"580a":function(n,e,t){"use strict";t.d(e,"b",(function(){return o})),t.d(e,"c",(function(){return i})),t.d(e,"a",(function(){return a}));var a={uniLoadMore:function(){return t.e("components/uni-load-more/uni-load-more").then(t.bind(null,"c87e"))}},o=function(){var n=this,e=n.$createElement,t=(n._self._c,n.__map(n.navList,(function(e,t){var a=n.__get_orig(e),o=!0===e.loaded&&0===e.orderList.length;return{$orig:a,g0:o}})));n.$mp.data=Object.assign({},{$root:{l0:t}})},i=[]},"9a9f":function(n,e,t){"use strict";(function(n){Object.defineProperty(e,"__esModule",{value:!0}),e.default=void 0;var a=t("5adf"),o={components:{uniLoadMore:function(){t.e("components/uni-load-more/uni-load-more").then(function(){return resolve(t("c87e"))}.bind(null,t)).catch(t.oe)},empty:function(){t.e("components/empty").then(function(){return resolve(t("c38b"))}.bind(null,t)).catch(t.oe)}},data:function(){return{tabCurrentIndex:0,navList:[{state:0,text:"全部",loadingType:"more",orderList:[],page:1,limit:10},{state:1,text:"未使用",loadingType:"more",orderList:[],page:1,limit:10},{state:2,text:"已使用",loadingType:"more",orderList:[],page:1,limit:10}]}},onLoad:function(n){this.loadData()},methods:{navTo:function(){n.switchTab({url:"/pages/index/index"})},loadData:function(e){var t=this,o=this.tabCurrentIndex,i=this.navList[o];i.state;"tabChange"===e&&!0===i.loaded||"loading"!==i.loadingType&&(i.loadingType="loading",(0,a.getCouponsList)({page:i.page,limit:i.limit},o).then((function(e){var a=e.data,o=a.map((function(n){return n.coupon_price=+n.coupon_price.replace(",",""),n.use_min_price=+n.use_min_price.replace(",",""),n}));i.orderList=i.orderList.concat(o),console.log(i.orderList),i.page++,i.limit!=a.length?(i.loadingType="noMore",n.hideLoading(),t.$set(i,"loaded",!0)):i.loadingType="more"})).catch((function(n){console.log(n)})))},changeTab:function(n){this.tabCurrentIndex=n.target.current,this.loadData("tabChange")},tabClick:function(n){this.tabCurrentIndex=n}}};e.default=o}).call(this,t("543d")["default"])},a8dc:function(n,e,t){"use strict";var a=t("4a61"),o=t.n(a);o.a},cf4b:function(n,e,t){"use strict";t.r(e);var a=t("9a9f"),o=t.n(a);for(var i in a)["default"].indexOf(i)<0&&function(n){t.d(e,n,(function(){return a[n]}))}(i);e["default"]=o.a}},[["352a","common/runtime","common/vendor"]]]);