pages-users-user_get_coupon-index.4f7fd866.js 6.6 KB

1
  1. (window["webpackJsonp"]=window["webpackJsonp"]||[]).push([["pages-users-user_get_coupon-index"],{7947:function(t,e,n){"use strict";n.r(e);var i=n("7fdb"),o=n("f77a");for(var u in o)"default"!==u&&function(t){n.d(e,t,(function(){return o[t]}))}(u);n("ceaf");var s,a=n("f0c5"),r=Object(a["a"])(o["default"],i["b"],i["c"],!1,null,"f3383130",null,!1,i["a"],s);e["default"]=r.exports},"7fdb":function(t,e,n){"use strict";var i;n.d(e,"b",(function(){return o})),n.d(e,"c",(function(){return u})),n.d(e,"a",(function(){return i}));var o=function(){var t=this,e=t.$createElement,i=t._self._c||e;return i("v-uni-view",[t.couponsList.length?i("v-uni-view",{staticClass:"coupon-list"},t._l(t.couponsList,(function(e,n){return i("v-uni-view",{key:n,staticClass:"item acea-row row-center-wrapper"},[i("v-uni-view",{staticClass:"money",class:e.is_use?"moneyGray":""},[i("v-uni-view",[t._v("¥"),i("v-uni-text",{staticClass:"num"},[t._v(t._s(e.coupon_price))])],1),i("v-uni-view",{staticClass:"pic-num"},[t._v("满"+t._s(e.use_min_price)+"元可用")])],1),i("v-uni-view",{staticClass:"text"},[i("v-uni-view",{staticClass:"condition line1"},[0===e.type?i("span",{staticClass:"line-title",class:1==e.is_use||2==e.is_use?"gray":""},[t._v("通用劵")]):1===e.type?i("span",{staticClass:"line-title",class:1==e.is_use||2==e.is_use?"gray":""},[t._v("品类券")]):i("span",{staticClass:"line-title",class:1==e.is_use||2==e.is_use?"gray":""},[t._v("商品券")]),i("span",[t._v(t._s(e.title))])]),i("v-uni-view",{staticClass:"data acea-row row-between-wrapper"},[i("v-uni-view",[t._v(t._s(e.start_time?e.start_time+"-":"")+t._s(e.end_time))]),1==e.is_use?i("v-uni-view",{staticClass:"bnt gray"},[t._v("已领取")]):2==e.is_use?i("v-uni-view",{staticClass:"bnt gray"},[t._v("已领完")]):i("v-uni-view",{staticClass:"bnt bg-color",on:{click:function(i){arguments[0]=i=t.$handleEvent(i),t.getCoupon(e.id,n)}}},[t._v("立即领取")])],1)],1)],1)})),1):t._e(),t.couponsList.length?i("v-uni-view",{staticClass:"loadingicon acea-row row-center-wrapper"},[i("v-uni-text",{staticClass:"loading iconfont icon-jiazai",attrs:{hidden:0==t.loading}}),t._v(t._s(t.loadTitle))],1):t.couponsList.length||1!=t.loading?t._e():i("v-uni-view",{staticClass:"noCommodity"},[i("v-uni-view",{staticClass:"pictrue"},[i("v-uni-image",{attrs:{src:n("d7e8")}})],1)],1)],1)},u=[]},9120:function(t,e,n){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.default=void 0;var i=n("d2a5"),o=n("c496"),u=n("2f62"),s={components:{},data:function(){return{couponsList:[],loading:!1,loadend:!1,loadTitle:"加载更多",page:1,limit:20,isAuto:!1,isShowAuth:!1}},computed:(0,u.mapGetters)(["isLogin"]),onLoad:function(){this.isLogin?this.getUseCoupons():(0,o.toLogin)()},onReachBottom:function(){this.getUseCoupons()},methods:{onLoadFun:function(){this.isShowAuth=!1,this.getUseCoupons()},authColse:function(t){this.isShowAuth=t},getCoupon:function(t,e){var n=this,o=n.couponsList;(0,i.setCouponReceive)(t).then((function(t){o[e].is_use=!0,n.$set(n,"couponsList",o),n.$util.Tips({title:"领取成功"})}),(function(t){return n.$util.Tips({title:t.msg})}))},getUseCoupons:function(){var t=this;return!this.loadend&&(!this.loading&&void(0,i.getCoupons)({page:t.page,limit:t.limit}).then((function(e){var n=e.data,i=n.length<t.limit,o=t.$util.SplitArray(n,t.couponsList);t.$set(t,"couponsList",o),t.loadend=i,t.loadTitle=i?"我也是有底线的":"加载更多",t.page=t.page+1,t.loading=!1})).catch((function(e){t.loading=!1,t.loadTitle="加载更多"})))}}};e.default=s},bcea:function(t,e,n){var i=n("e303");"string"===typeof i&&(i=[[t.i,i,""]]),i.locals&&(t.exports=i.locals);var o=n("4f06").default;o("867ae920",i,!0,{sourceMap:!1,shadowMode:!1})},ceaf:function(t,e,n){"use strict";var i=n("bcea"),o=n.n(i);o.a},d2a5:function(t,e,n){"use strict";var i=n("4ea4");Object.defineProperty(e,"__esModule",{value:!0}),e.getIndexData=u,e.getLogo=s,e.setFormId=a,e.setCouponReceive=r,e.getCoupons=c,e.getShopCoupons=l,e.getUserCoupons=f,e.getArticleCategoryList=d,e.getArticleList=g,e.getArticleHotList=p,e.getArticleBannerList=v,e.getArticleDetails=h,e.loginMobile=_,e.verifyCode=w,e.registerVerify=b,e.phoneRegister=m,e.phoneRegisterReset=C,e.phoneLogin=y,e.switchH5Login=A,e.bindingPhone=L,e.logout=x,e.getTemlIds=k,e.pink=T,e.getCity=$,e.getLiveList=R;var o=i(n("112d"));function u(){return o.default.get("common/home",{},{noAuth:!0})}function s(){return o.default.get("wechat/get_logo",{},{noAuth:!0})}function a(t){return o.default.post("wechat/set_form_id",{formId:t})}function r(t){return o.default.post("coupon/receive/"+t)}function c(t){return o.default.get("coupon/product",t,{noAuth:!0})}function l(t){return o.default.get("coupon/store/"+t,{},{noAuth:!0})}function f(t){return o.default.get("coupon/list",t)}function d(){return o.default.get("article/category/lst",{},{noAuth:!0})}function g(t,e){return o.default.get("article/lst/"+t,e,{noAuth:!0})}function p(){return o.default.get("article/hot/list",{},{noAuth:!0})}function v(){return o.default.get("article/banner/list",{},{noAuth:!0})}function h(t){return o.default.get("article/detail/"+t,{},{noAuth:!0})}function _(t){return o.default.post("login/mobile",t,{noAuth:!0})}function w(){return o.default.get("verify_code",{},{noAuth:!0})}function b(t,e,n,i){return o.default.post("register/verify",{phone:t,type:void 0===e?"reset":e,key:n,code:i},{noAuth:!0})}function m(t){return o.default.post("register",t,{noAuth:!0})}function C(t){return o.default.post("register/reset",t,{noAuth:!0})}function y(t){return o.default.post("login",t,{noAuth:!0})}function A(t){return o.default.post("user/switch",t)}function L(t){return o.default.post("user/binding",t)}function x(){return o.default.get("logout")}function k(){return o.default.get("wechat/teml_ids",{},{noAuth:!0})}function T(){return o.default.get("pink",{},{noAuth:!0})}function $(){return o.default.get("system/city/lst",{},{noAuth:!0})}function R(t,e){return o.default.get("wechat/live",{page:t,limit:e},{noAuth:!0})}},d7e8:function(t,e,n){t.exports=n.p+"static/img/noCoupon.cca04173.png"},e303:function(t,e,n){var i=n("24fb");e=i(!1),e.push([t.i,".condition .line-title[data-v-f3383130]{width:%?90?%;padding:0 %?10?%;-webkit-box-sizing:border-box;box-sizing:border-box;background:#fff7f7;border:1px solid #e83323;opacity:1;-webkit-border-radius:%?20?%;border-radius:%?20?%;font-size:%?20?%;color:#e83323;margin-right:%?12?%}.condition .line-title.gray[data-v-f3383130]{border-color:#bbb;color:#bbb;background-color:#f5f5f5}.coupon-list .pic-num[data-v-f3383130]{color:#fff;font-size:%?24?%}",""]),t.exports=e},f77a:function(t,e,n){"use strict";n.r(e);var i=n("9120"),o=n.n(i);for(var u in i)"default"!==u&&function(t){n.d(e,t,(function(){return i[t]}))}(u);e["default"]=o.a}}]);