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