(window["webpackJsonp"]=window["webpackJsonp"]||[]).push([["chunk-146ed97a"],{"5f10":function(s,t,i){s.exports=i.p+"h5/img/noCoupon.e524084b.png"},b701:function(s,t,i){"use strict";i.r(t);var n=function(){var s=this,t=s.$createElement,i=s._self._c||t;return i("div",{ref:"container"},[s.couponsList.length>0?i("div",{staticClass:"coupon-list"},s._l(s.couponsList,(function(t,n){return i("div",{key:n,staticClass:"item acea-row row-center-wrapper"},[i("div",{staticClass:"money",class:t.is_use?"moneyGray":""},[i("div",[s._v("\n          ￥"),i("span",{staticClass:"num"},[s._v(s._s(t.coupon_price))])]),i("div",{staticClass:"pic-num"},[s._v("满"+s._s(t.use_min_price)+"元可用")])]),i("div",{staticClass:"text"},[i("div",{staticClass:"condition line1"},[0===t.type?i("span",{staticClass:"line-title",class:!0===t.is_use||2===t.is_use?"bg-color-huic":"bg-color-check"},[s._v("通用劵")]):1===t.type?i("span",{staticClass:"line-title",class:!0===t.is_use||2===t.is_use?"bg-color-huic":"bg-color-check"},[s._v("品类券")]):i("span",{staticClass:"line-title",class:!0===t.is_use||2===t.is_use?"bg-color-huic":"bg-color-check"},[s._v("商品券")]),i("span",[s._v(s._s(t.title))])]),i("div",{staticClass:"data acea-row row-between-wrapper"},[0!==t.end_time?i("div",[s._v("\n            "+s._s(t.start_time?t.start_time+"-":"")+s._s(t.end_time)+"\n          ")]):i("div",[s._v("不限时")]),!0===t.is_use?i("div",{staticClass:"bnt gray"},[s._v("已领取")]):2===t.is_use?i("div",{staticClass:"bnt gray"},[s._v("已领完")]):i("div",{staticClass:"bnt bg-color-red",on:{click:function(i){return s.getCoupon(t.id,n)}}},[s._v("\n            立即领取\n          ")])])])])})),0):s._e(),i("Loading",{attrs:{loaded:s.loadend,loading:s.loading}}),0===s.couponsList.length&&s.page>1?i("div",{staticClass:"noCommodity"},[s._m(0)]):s._e()],1)},e=[function(){var s=this,t=s.$createElement,n=s._self._c||t;return n("div",{staticClass:"noPictrue"},[n("img",{staticClass:"image",attrs:{src:i("5f10")}})])}],a=i("c24f"),o=i("3a5e"),c={name:"getCoupon",components:{Loading:o["a"]},props:{},data:function(){return{page:1,limit:10,couponsList:[],loading:!1,loadend:!1}},mounted:function(){var s=this;this.getUseCoupons(),this.$scroll(this.$refs.container,(function(){!s.loading&&s.getUseCoupons()}))},methods:{getCoupon:function(s,t){var i=this,n=i.couponsList;Object(a["r"])(s).then((function(){n[t].is_use=!0,i.$dialog.toast({mes:"领取成功"})})).catch((function(s){i.$dialog.toast({mes:s.msg})}))},getUseCoupons:function(){var s=this;if(!s.loading&&!s.loadend){s.loading=!0;var t={page:s.page,limit:s.limit};Object(a["q"])(t).then((function(t){s.loading=!1,s.couponsList.push.apply(s.couponsList,t.data),s.loadend=t.data.length<s.limit,s.page=s.page+1}))}}}},l=c,u=i("2877"),r=Object(u["a"])(l,n,e,!1,null,null,null);t["default"]=r.exports}}]);
//# sourceMappingURL=chunk-146ed97a.aaabc1f2.js.map