周总批发商场
dianshang/crmeb/public/static/js/pages-users-user_get_coupon...

1 line
12 KiB

(window["webpackJsonp"]=window["webpackJsonp"]||[]).push([["pages-users-user_get_coupon-index"],{"208d":function(t,e,i){"use strict";i("7a82");var n=i("4ea4").default;Object.defineProperty(e,"__esModule",{value:!0}),e.default=void 0,i("d3b7"),i("159b");var o=i("5743"),a=i("86eb"),s=i("26cb"),c=n(i("3b71")),r=n(i("19b6")),u=i("00a0"),l={components:{home:c.default},mixins:[r.default],data:function(){return{imgHost:u.HTTP_REQUEST_URL,couponsList:[],loading:!1,loadend:!1,loadTitle:this.$t("加载更多"),page:1,limit:20,isAuto:!1,isShowAuth:!1,type:0,navList:[{type:0,name:this.$t("通用券"),count:0},{type:1,name:this.$t("品类券"),count:0},{type:2,name:this.$t("商品券"),count:0}],count:0,receiveLoading:!1}},computed:(0,s.mapGetters)(["isLogin"]),watch:{isLogin:{handler:function(t,e){t&&this.getUseCoupons()},deep:!0}},onLoad:function(){this.isLogin?this.getUseCoupons():(0,a.toLogin)()},onReachBottom:function(){this.getUseCoupons()},methods:{onLoadFun:function(){this.getUseCoupons()},authColse:function(t){this.isShowAuth=t},getCoupon:function(t,e){if(!this.receiveLoading){var i=this;this.receiveLoading=!0,(0,o.setCouponReceive)(t).then((function(t){e.is_use+=1,i.$util.Tips({title:i.$t("领取成功")}),setTimeout((function(t){i.receiveLoading=!1}),500)})).catch((function(t){return i.receiveLoading=!1,i.$util.Tips({title:t})}))}},getUseCoupons:function(){var t=this;return!this.loadend&&(!this.loading&&(t.loading=!0,t.loadTitle=t.$t("加载更多"),void(0,o.getCoupons)({type:t.type,page:t.page,limit:t.limit}).then((function(e){var i=e.data.list,n=i.length<t.limit,o=t.$util.SplitArray(i,t.couponsList);e.data.count.forEach((function(e,i){t.navList[i].count=e,e&&t.count++})),t.$set(t,"couponsList",o),t.loadend=n,t.loading=!1,t.loadTitle=n?t.$t("我也是有底线的"):t.$t("加载更多"),t.page=t.page+1})).catch((function(e){t.loading=!1,t.loadTitle=t.$t("加载更多")}))))},setType:function(t){this.type!==t&&(this.type=t,this.couponsList=[],this.page=1,this.loadend=!1,this.getUseCoupons())}}};e.default=l},2746:function(t,e,i){"use strict";i.d(e,"b",(function(){return n})),i.d(e,"c",(function(){return o})),i.d(e,"a",(function(){}));var n=function(){var t=this,e=t.$createElement,i=t._self._c||e;return i("v-uni-view",{style:t.colorStyle},[t.count>1?i("v-uni-view",{staticClass:"acea-row row-around nav"},[t._l(t.navList,(function(e){return[e.count?i("v-uni-view",{key:e.type,class:["acea-row","row-middle",t.type===e.type?"on":""],on:{click:function(i){arguments[0]=i=t.$handleEvent(i),t.setType(e.type)}}},[t._v(t._s(e.name))]):t._e()]}))],2):t._e(),t.count>1?i("v-uni-view",{staticStyle:{height:"106rpx"}}):t._e(),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",class:{svip:4===e.receive_type}},[i("v-uni-view",{staticClass:"moneyCon acea-row row-center-wrapper"},[i("v-uni-view",{staticClass:"money",class:e.is_use>=e.receive_limit?"moneyGray":""},[i("v-uni-view",[t._v(t._s(t.$t("¥"))),i("v-uni-text",{staticClass:"num"},[t._v(t._s(e.coupon_price))])],1),e.use_min_price>0?i("v-uni-view",{staticClass:"pic-num"},[t._v(t._s(t.$t("满"))+" "+t._s(e.use_min_price)+"\n\t\t\t\t\t\t"+t._s(t.$t("元可用")))]):i("v-uni-view",{staticClass:"pic-num"},[t._v(t._s(t.$t("无门槛券")))])],1)],1),i("v-uni-view",{staticClass:"text"},[i("v-uni-view",{staticClass:"condition"},[i("v-uni-view",{staticClass:"name line2"},[0===e.type?i("v-uni-view",{staticClass:"line-title",class:e.is_use>=e.receive_limit?"bg-color-huic":""},[t._v(t._s(t.$t("通用劵")))]):1===e.type?i("v-uni-view",{staticClass:"line-title",class:e.is_use>=e.receive_limit?"bg-color-huic":""},[t._v(t._s(t.$t("品类券")))]):i("v-uni-view",{staticClass:"line-title",class:e.is_use>=e.receive_limit?"bg-color-huic":""},[t._v(t._s(t.$t("商品券")))]),4===e.receive_type?i("v-uni-image",{staticClass:"pic",attrs:{src:"/static/images/fvip.png"}}):t._e(),i("v-uni-text",{staticClass:"title"},[t._v(t._s(t.$t(e.title)))])],1)],1),i("v-uni-view",{staticClass:"data acea-ro