text: (window["webpackJsonp"]=window["webpackJsonp"]||[]).push([["otherpages-goods-coupon-coupon"],{"163e":function(t,e,i){var o=i("fdea");"string"===typeof o&&(o=[[t.i,o,""]]),o.locals&&(t.exports=o.locals);var n=i("4f06").default;n("4043fd8b",o,!0,{sourceMap:!1,shadowMode:!1})},"5ddd":function(t,e,i){"use strict";i.r(e);var o=i("77ab"),n=i.n(o);for(var a in o)"default"!==a&&function(t){i.d(e,t,(function(){return o[t]}))}(a);e["default"]=n.a},"655e":function(t,e,i){"use strict";i.r(e);var o=i("aa35"),n=i("5ddd");for(var a in n)"default"!==a&&function(t){i.d(e,t,(function(){return n[t]}))}(a);i("f644"),i("d2ff");var s,r=i("f0c5"),u=Object(r["a"])(n["default"],o["b"],o["c"],!1,null,"99a23b14",null,!1,o["a"],s);e["default"]=u.exports},"77ab":function(t,e,i){"use strict";var o=i("4ea4");i("99af"),i("4160"),i("159b"),Object.defineProperty(e,"__esModule",{value:!0}),e.default=void 0;var n=o(i("c409")),a={data:function(){return{list:[],couponBtnSwitch:!1}},components:{},onShow:function(){var t=this;if(!this.addonIsExit.coupon)return this.$util.showToast({title:"商家未开启优惠券",mask:!0,duration:2e3}),void setTimeout((function(){t.$util.redirectTo("/pages/index/index/index",{},"redirectTo")}),2e3);this.$langConfig.refresh()},mixins:[n.default],methods:{liClick:function(t,e){0==t.useState?this.receiveCoupon(t,e):this.toGoodsList(t,e)},receiveCoupon:function(t,e){var i=this;if(!this.couponBtnSwitch){this.couponBtnSwitch=!0;var o=uni.getStorageSync("token");""!=o?this.$api.sendRequest({url:"/coupon/api/coupon/receive",data:{coupon_type_id:t.coupon_type_id,get_type:2},success:function(e){i.couponBtnSwitch=!1;var o="";o="领取成功，快去使用吧";var n=i.list;if(o=1==e.data.is_exist&&e.code<0?"您已领取过该优惠券，快去使用吧":e.message,1==e.data.is_exist)for(var a=0;a<n.length;a++)n[a].coupon_type_id==t.coupon_type_id&&(n[a].useState=1);else for(var s=0;s<n.length;s++)n[s].coupon_type_id==t.coupon_type_id&&(n[s].useState=2);i.$util.showToast({title:o})},fail:function(t){i.couponBtnSwitch=!1}}):(this.couponBtnSwitch=!1,this.$refs.login.open("/pages/login/login/login"))}},getMemberCounponList:function(t){var e=this;this.$api.sendRequest({url:"/coupon/api/coupon/typepagelists",data:{page:t.num,page_size:t.size},success:function(i){var o=[],n=i.message;0==i.code&&i.data?o=i.data.list:e.$util.showToast({title:n}),t.endSuccess(o.length),o.length&&o.forEach((function(t){t.count==t.lead_count?t.useState=2:t.useState=0})),1==t.num&&(e.list=[]),e.list=e.list.concat(o),e.$refs.loadingCover&&e.$refs.loadingCover.hide()},fail:function(){t.endErr(),this.$refs.loadingCover&&this.$refs.loadingCover.hide()}})},imageError:function(t){this.list[t].logo=this.$util.getDefaultImage().default_goods_img,this.$forceUpdate()},couponImageError:function(t){this.list[t].image=this.$util.img("upload/uniapp/goods/coupon.png"),this.$forceUpdate()},toGoodsList:function(t){1!=t.goods_type?this.$util.redirectTo("/pages/goods/list/list",{coupon:t.coupon_type_id}):this.$util.redirectTo("/pages/goods/list/list",{})}},onShareAppMessage:function(t){var e="送您一张优惠券,快来领取吧",i="/otherpages/goods/coupon/coupon";return{title:e,path:i,success:function(t){},fail:function(t){}}}};e.default=a},aa35:function(t,e,i){"use strict";i.d(e,"b",(function(){return n})),i.d(e,"c",(function(){return a})),i.d(e,"a",(function(){return o}));var o={nsEmpty:i("2c4c").default,loadingCover:i("790a").default,nsLogin:i("2893").default},n=function(){var t=this,e=t.$createElement,i=t._self._c||e;return i("v-uni-view",{attrs:{"data-theme":t.themeStyle}},[i("mescroll-uni",{ref:"mescroll",on:{getData:function(e){arguments[0]=e=t.$handleEvent(e),t.getMemberCounponList.apply(void 0,arguments)}}},[i("template",{attrs:{slot:"list"},slot:"list"},[i("v-uni-view",{staticClass:"coupon-listone"},t._l(t.list,(function(e,o){return i("v-uni-view",{key:o,staticClass:"item",style:{backgroundColor:2==e.useState?"#F2F2F2":"#FFF2F0"},on:{click:function(i){arguments[0]=i=t.$handleEvent(i),t.liClick(e,o)}}},[i("v-uni-view",{staticClass:"item-base",style:{backgroundImage:"url("+t.$util.img(2==e.useState?"/upload/uniapp/coupon/bg_lingqu_gary.png":"/upload/uniapp/coupon/bg_lingqu.png")+")"}},[i("v-uni-view",["reward"==e.type?i("v-uni-view",{staticClass:"use_price",class:{disabled:2==e.useState}},[i("v-uni-text",[t._v("￥")]),t._v(t._s(parseInt(e.money)))],1):"discount"==e.type?i("v-uni-view",{staticClass:"use_price",class:{disabled:2==e.useState}},[t._v(t._s(parseFloat(e.discount))),i("v-uni-text",[t._v("折")])],1):t._e(),e.at_least>0?i("v-uni-view",{staticClass:"use_condition font-size-tag",class:{disabled:2==e.useState}},[t._v("满"+t._s(e.at_least)+"元可用")]):i("v-uni-view",{staticClass:"use_condition font-size-tag",class:{disabled:2==e.useState}},[t._v("无门槛优惠券")])],1)],1),i("v-uni-view",{staticClass:"item-info"},[i("v-uni-view",{staticClass:"use_title"},[i("v-uni-view",{staticClass:"title"},[t._v(t._s(e.coupon_name))]),1==e.goods_type?i("v-uni-view",{staticClass:"max_price",class:{disabled:2==e.useState}},[t._v("全场商品")]):i("v-uni-view",{staticClass:"max_price",class:{disabled:2==e.useState}},[t._v("指定商品")]),"0.00"!=e.discount_limit?i("v-uni-view",{staticClass:"max_price"},[t._v("(最大优惠"+t._s(e.discount_limit)+"元)")]):t._e()],1),e.validity_type?i("v-uni-view",{staticClass:"use_time"},[t._v("有效期：领取之日起"+t._s(e.fixed_term)+"日内有效")]):i("v-uni-view",{staticClass:"use_time"},[t._v("有效期："+t._s(t.$util.timeStampTurnTime(e.end_time)))])],1),i("v-uni-view",{staticClass:"item-btn"},[0==e.useState?i("v-uni-view",{on:{click:function(i){i.stopPropagation(),arguments[0]=i=t.$handleEvent(i),t.receiveCoupon(e,o)}}},[t._v("领取")]):t._e(),1==e.useState?i("v-uni-view",{on:{click:function(i){i.stopPropagation(),arguments[0]=i=t.$handleEvent(i),t.toGoodsList(e,o)}}},[t._v("去使用")]):t._e(),2==e.useState?i("v-uni-view",{class:{disabled:2==e.useState}},[t._v("已抢光")]):t._e()],1)],1)})),1),0==t.list.length?i("v-uni-view",[i("ns-empty",{attrs:{text:"暂无可领取的优惠券",isIndex:!1,fixed:!1}})],1):t._e()],1)],2),i("loading-cover",{ref:"loadingCover"}),i("ns-login",{ref:"login"})],1)},a=[]},d2ff:function(t,e,i){"use strict";var o=i("163e"),n=i.n(o);n.a},ef41:function(t,e,i){var o=i("f97d");"string"===typeof o&&(o=[[t.i,o,""]]),o.locals&&(t.exports=o.locals);var n=i("4f06").default;n("e8906138",o,!0,{sourceMap:!1,shadowMode:!1})},f644:function(t,e,i){"use strict";var o=i("ef41"),n=i.n(o);n.a},f97d:function(t,e,i){var o=i("24fb");e=o(!1),e.push([t.i,'@charset "UTF-8";\r\n/**\r\n * 你可以通过修改这些变量来定制自己的插件主题，实现自定义主题功能\r\n * 建议使用scss预处理，并在插件代码中直接使用这些变量（无需 import 这个文件），方便用户通过搭积木的方式开发整体风格一致的App\r\n */.coupon-listone[data-v-99a23b14]{margin:0 %?30?%}.coupon-listone .item[data-v-99a23b14]{display:-webkit-box;display:-webkit-flex;display:flex;background-color:#fff2f0;background-size:100% 100%;-webkit-border-radius:%?20?%;border-radius:%?20?%;-webkit-box-align:stretch;-webkit-align-items:stretch;align-items:stretch;margin-top:%?20?%;overflow:hidden}.coupon-listone .item .item-base[data-v-99a23b14]{position:relative;width:%?197?%;min-width:%?197?%;text-align:center;background-image:-webkit-gradient(linear,left bottom,right top,from(#fc6831),to(#ff4544));background-image:-webkit-linear-gradient(left bottom,#fc6831,#ff4544);background-image:linear-gradient(to right top,#fc6831,#ff4544);background-repeat:no-repeat;background-size:100% 100%;padding:%?38?% %?10?% %?38?% %?18?%}.coupon-listone .item .item-base > uni-view[data-v-99a23b14]{height:auto;position:relative;top:50%;-webkit-transform:translateY(-50%);transform:translateY(-50%)}.coupon-listone .item .item-base .use_price[data-v-99a23b14]{font-size:%?60?%;line-height:1;color:#fff}.coupon-listone .item .item-base .use_price uni-text[data-v-99a23b14]{font-size:%?32?%}.coupon-listone .item .item-base .use_price.disabled[data-v-99a23b14]{color:#909399}.coupon-listone .item .item-base .use_condition[data-v-99a23b14]{color:#fff;margin-top:%?20?%}.coupon-listone .item .item-base .use_condition.margin_top_none[data-v-99a23b14]{margin-top:0}.coupon-listone .item .item-base .use_condition.disabled[data-v-99a23b14]{color:#909399}.coupon-listone .item .item-base[data-v-99a23b14]::after{position:absolute;content:"";background-color:#fff;left:0;top:50%;-webkit-transform:translateY(-50%);transform:translateY(-50%);height:%?30?%;width:%?15?%;-webkit-border-radius:0 15px 15px 0;border-radius:0 15px 15px 0}.coupon-listone .item .item-btn[data-v-99a23b14]{width:%?160?%;min-width:%?160?%;-webkit-align-self:center;align-self:center;position:relative}.coupon-listone .item .item-btn uni-view[data-v-99a23b14]{width:%?100?%;height:%?50?%;-webkit-border-radius:%?50?%;border-radius:%?50?%;line-height:%?50?%;margin:auto;text-align:center;background-image:-webkit-gradient(linear,left top,right top,from(#fc6831),to(#ff4544));background-image:-webkit-linear-gradient(left,#fc6831,#ff4544);background-image:linear-gradient(90deg,#fc6831,#ff4544);color:#fff;font-size:%?24?%}.coupon-listone .item .item-btn uni-view.disabled[data-v-99a23b14]{background:#dedede!important;color:#909399!important}.coupon-listone .item .item-btn[data-v-99a23b14]::after{position:absolute;content:"";background-color:#fff;right:0;top:50%;-webkit-transform:translateY(-50%);transform:translateY(-50%);height:%?30?%;width:%?15?%;-webkit-border-radius:15px 0 0 15px;border-radius:15px 0 0 15px}.coupon-listone .item .item-info[data-v-99a23b14]{-webkit-box-flex:1;-webkit-flex:1;flex:1;display:-webkit-box;display:-webkit-flex;display:flex;-webkit-box-orient:vertical;-webkit-box-direction:normal;-webkit-flex-direction:column;flex-direction:column;-webkit-box-pack:justify;-webkit-justify-content:space-between;justify-content:space-between;margin-left:%?20?%;overflow:hidden;background-repeat-x:no-repeat;background-repeat-y:repeat}.coupon-listone .item .item-info .use_time[data-v-99a23b14]{padding:%?20?% 0;border-top:1px dashed #ccc;font-size:%?20?%;color:#909399}.coupon-listone .item .item-info .use_title[data-v-99a23b14]{font-size:%?28?%;font-weight:500;padding:%?20?% 0}.coupon-listone .item .item-info .use_title .title[data-v-99a23b14]{overflow:hidden;white-space:nowrap;text-overflow:ellipsis}.coupon-listone .item .item-info .use_title .max_price[data-v-99a23b14]{font-weight:400;font-size:%?24?%}.empty[data-v-99a23b14]{margin-top:%?200?%}',""]),t.exports=e},fdea:function(t,e,i){var o=i("24fb");e=o(!1),e.push([t.i,"[data-v-99a23b14] .reward-popup .uni-popup__wrapper-box{background:none!important;max-width:unset!important;max-height:unset!important}",""]),t.exports=e}}]);