canyin-project/ybcy/views/mobile/static/js/yb_wm-my-coupon-coupon-dl.b394826a.js
2024-11-01 16:07:54 +08:00

1 line
11 KiB
JavaScript

(window["webpackJsonp"]=window["webpackJsonp"]||[]).push([["yb_wm-my-coupon-coupon-dl"],{"16e1":function(t,a,e){"use strict";e.r(a);var i=e("9d44"),s=e("8d534");for(var n in s)"default"!==n&&function(t){e.d(a,t,(function(){return s[t]}))}(n);e("4b52");var o,r=e("f0c5"),u=Object(r["a"])(s["default"],i["b"],i["c"],!1,null,"22272220",null,!1,i["a"],o);a["default"]=u.exports},4789:function(t,a,e){"use strict";var i=e("4ea4");e("c975"),e("a9e3"),e("b680"),Object.defineProperty(a,"__esModule",{value:!0}),a.utilMixins=a.sljz=void 0;var s=i(e("5530")),n=e("2f62"),o=i(e("8bb1")),r={data:function(){return{dataList:[],bfList:[],isget:!1,mygd:!1}},onReachBottom:o.default.debounce((function(t){!this.mygd&&this.isget&&(this.isget=!1,this.getList())}),300)};a.sljz=r;var u={computed:(0,s.default)({},(0,n.mapState)({})),methods:{timeToDate:function(t,a){return o.default.timeToDate(t,a)},dateToTime:function(t){return o.default.dateToTime(t)},getSingleImg:function(t){return t.indexOf("http")>-1?t:this.url+t},snText:function(t,a){return t&&t.length>a?t.substring(0,a)+"...":t},blxs:function(t){var a=arguments.length>1&&void 0!==arguments[1]?arguments[1]:2;return Number(Number(t).toFixed(a))},payName:function(t){var a="";switch(+t){case 1:a="微信支付";break;case 2:a="支付宝支付";break;case 3:a="百度支付";break;case 5:a="余额支付";break}return a},cTR:function(t){return o.default.colorToRGB(t)},cTRld:function(t,a){return o.default.ldColor(t,a)}}};a.utilMixins=u},"4b52":function(t,a,e){"use strict";var i=e("e0af"),s=e.n(i);s.a},"8d534":function(t,a,e){"use strict";e.r(a);var i=e("8ea5"),s=e.n(i);for(var n in i)"default"!==n&&function(t){e.d(a,t,(function(){return i[t]}))}(n);a["default"]=s.a},"8ea5":function(t,a,e){"use strict";var i=e("4ea4");e("99af"),e("c975"),e("d3b7"),Object.defineProperty(a,"__esModule",{value:!0}),a.default=void 0,e("96cf");var s=i(e("1da1")),n=(e("2f62"),e("4789")),o=i(e("6ba4")),r=i(e("f3fc")),u=i(e("0b28")),c={name:"couponDl",components:{mgCoupon:o.default,MgCell:r.default,mgRtext:u.default},data:function(){return{dataInfo:{},query:{},active:!1,loading:!1}},onLoad:function(t){var a=this;return(0,s.default)(regeneratorRuntime.mark((function e(){return regeneratorRuntime.wrap((function(e){while(1)switch(e.prev=e.next){case 0:return a.query=t,a.getSystem(),a.util.setNT("优惠券详情"),e.next=5,a.getLoginInfo();case 5:a.getInfo();case 6:case"end":return e.stop()}}),e)})))()},mixins:[n.utilMixins],computed:{color:function(){return this.dataInfo.color},sycjName:function(){if(this.dataInfo.useType){var t=this.dataInfo.useType,a=[];return t.indexOf(1)>-1&&a.push("外卖可用"),t.indexOf(2)>-1&&a.push("堂食可用"),t.indexOf(3)>-1&&a.push("快餐可用"),a.toString()}},qlx:function(){if(this.dataInfo.id){var t="";switch(+this.dataInfo.type){case 1:t="代金券";break;case 2:t="折扣券";break;case 3:t="商品兑换券";break}return t}},anlx:function(){if(this.dataInfo.id){var t="";switch(+this.dataInfo.useState){case 1:t="点击领取";break;case 2:t="点击使用";break;case 3:t="已使用";break;case 4:t="未到使用时间";break;case 5:t="已过期";break}return t}}},methods:{getInfo:function(){var t=this;return(0,s.default)(regeneratorRuntime.mark((function a(){var e,i;return regeneratorRuntime.wrap((function(a){while(1)switch(a.prev=a.next){case 0:return a.next=2,t.util.request({url:t.api.yhqxq,method:"POST",mask:1,data:{id:t.query.id||"",receiveId:t.query.receiveId||""}});case 2:e=a.sent,i=e.data,i.color||(i.color="#EE472B"),t.dataInfo=i,t.loading=!1;case 7:case"end":return a.stop()}}),a)})))()},ljsy:function(){var t=this;return(0,s.default)(regeneratorRuntime.mark((function a(){var e,i;return regeneratorRuntime.wrap((function(a){while(1)switch(a.prev=a.next){case 0:if(e=t.dataInfo.useState,1!=e){a.next=9;break}return t.loading=!0,a.next=5,t.util.request({url:t.api.lqyhq,method:"POST",mask:1,data:{couponId:t.dataInfo.id}});case 5:i=a.sent,i?(t.util.message("领取成功",1),setTimeout((function(){t.getInfo()}),500)):t.loading=!1,a.next=10;break;case 9:2==e&&t.go({t:6,url:"/yb_wm/index/goods"});case 10:case"end":return a.stop()}}),a)})))()},gosjDL:function(t){this.go({t:6,url:"/yb_wm/index/goods"})}},onShareAppMessage:function(){var t="yb_wm/my/coupon/coupon-dl?id=".concat(this.dataInfo.id,"&receiveId=").concat(this.query.receiveId||"");return this.util.mpShare({t:this.dataInfo.shareTitle,i:this.getImgS(this.dataInfo.shareImg),p:t})},onShareTimeline:function(t){return{title:this.dataInfo.shareTitle,imageUrl:this.getImgS(this.dataInfo.shareImg)}}};a.default=c},"9d44":function(t,a,e){"use strict";var i;e.d(a,"b",(function(){return s})),e.d(a,"c",(function(){return n})),e.d(a,"a",(function(){return i}));var s=function(){var t=this,a=t.$createElement,e=t._self._c||a;return e("v-uni-view",{directives:[{name:"show",rawName:"v-show",value:t.dataInfo.id,expression:"dataInfo.id"}],staticClass:"mh100",style:{background:t.color}},[e("v-uni-view",{staticClass:"cl-main"},[e("v-uni-view",{staticClass:"timg bsf posi-r"},[e("mg-img",{attrs:{src:t.dataInfo.shareImg||t.system.icon}})],1),e("v-uni-view",{staticClass:"cl-bd bf"},[e("v-uni-view",{staticClass:"p03"},[e("v-uni-view",{staticClass:"t-c f32 wei"},[t._v(t._s(t.dataInfo.name))]),e("v-uni-view",{staticClass:"p20 bbd"},[e("v-uni-view",{},[t._v("适用金额")]),e("v-uni-view",{staticClass:"mt20 f30 wei"},[t._v(t._s(t.dataInfo.fullMoney>0?"满"+(t.sl+t.dataInfo.fullMoney)+"可用":"无门槛"))])],1),e("v-uni-view",{staticClass:"p20 bbd"},[e("v-uni-view",{staticClass:"mb10"},[t._v("卡券类型")]),e("v-uni-view",{staticClass:"f-row mb30 f24 c9"},[e("v-uni-view",{staticClass:"yd f-g-0"}),e("v-uni-view",[t._v(t._s(t.qlx))])],1),e("v-uni-view",{staticClass:"mb10"},[t._v("有效期限")]),e("v-uni-view",{staticClass:"mb30 f24 c9"},[t.dataInfo.startTime?e("v-uni-view",{staticClass:"f-row mb10"},[e("v-uni-view",{staticClass:"yd f-g-0"}),e("v-uni-view",[t._v("活动时间:"+t._s(t.timeToDate(t.dataInfo.startTime))+"至"+t._s(t.timeToDate(t.dataInfo.endTime)))])],1):t._e(),e("v-uni-view",{staticClass:"f-row"},[e("v-uni-view",{staticClass:"yd f-g-0"}),e("v-uni-view",[t._v("使用时间:"+t._s(t.dataInfo.useExplain))])],1)],1),e("v-uni-view",{staticClass:"mb10"},[t._v("卡券面额")]),e("v-uni-view",{staticClass:"mb30 f24 c9"},[3!=t.dataInfo.type?e("v-uni-view",{staticClass:"f-row mb10"},[e("v-uni-view",{staticClass:"yd f-g-0"}),e("v-uni-view",[t._v("面额:"+t._s(1==t.dataInfo.type?""+(t.sl+t.dataInfo.money):t.dataInfo.discount+"折"))])],1):t._e(),t.dataInfo.stock?e("v-uni-view",{staticClass:"f-row"},[e("v-uni-view",{staticClass:"yd f-g-0"}),e("v-uni-view",[t._v("库存:"+t._s(t.dataInfo.stock)+"张")])],1):t._e()],1),e("v-uni-view",{staticClass:"mb10"},[t._v("适用规则")]),e("v-uni-view",{staticClass:"mb30 f24 c9"},[e("v-uni-view",{staticClass:"f-row mb10"},[e("v-uni-view",{staticClass:"yd f-g-0"}),e("v-uni-view",{staticClass:"f-row"},[e("v-uni-view",{staticClass:"f-g-0"},[t._v("适用门店:")]),"2"==t.dataInfo.storeType?e("v-uni-view",[t._v("全部门店")]):e("v-uni-view",[t.dataInfo.storeData?t._l(t.dataInfo.storeData,(function(a,i){return e("v-uni-view",{key:i,on:{click:function(e){arguments[0]=e=t.$handleEvent(e),t.gosjDL(a)}}},[t._v(t._s(a.name))])})):t._e()],2)],1)],1),"3"!=t.dataInfo.type?e("v-uni-view",{staticClass:"f-row mb10"},[e("v-uni-view",{staticClass:"yd f-g-0"}),e("v-uni-view",{staticClass:"f-g-0"},[t._v("适用商品:")]),e("v-uni-view",[t._v(t._s(1==t.dataInfo.goodsType?"全部商品可用":2==t.dataInfo.goodsType?"指定商品可用":3==t.dataInfo.goodsType?"指定商品不可用":"指定商品分类可用"))])],1):t._e(),"3"==t.dataInfo.type?e("v-uni-view",{staticClass:"f-row mb10"},[e("v-uni-view",{staticClass:"yd f-g-0"}),e("v-uni-view",{staticClass:"f-g-0"},[t._v("适用商品:")]),e("v-uni-view",[t._v(t._s(t.dataInfo.goodsName))])],1):t._e(),e("v-uni-view",{staticClass:"f-row mb10"},[e("v-uni-view",{staticClass:"yd f-g-0"}),e("v-uni-view",{staticClass:"f-row"},[e("v-uni-view",{staticClass:"f-g-0"},[t._v("适用场景:")]),e("v-uni-view",[t._v(t._s(t.sycjName))])],1)],1),e("v-uni-view",{staticClass:"f-row"},[e("v-uni-view",{staticClass:"yd f-g-0"}),e("v-uni-view",{staticClass:"f-row"},[e("v-uni-view",{staticClass:"f-g-0"},[t._v("发行门店:")]),e("v-uni-view",[t._v(t._s(t.dataInfo.storeName))])],1)],1)],1),t.query.islq?t._e():[e("v-uni-view",{staticClass:"mb10"},[t._v("领取规则")]),e("v-uni-view",{staticClass:"mb30 f24 c9"},[e("v-uni-view",{staticClass:"f-row mb10"},[e("v-uni-view",{staticClass:"yd f-g-0"}),e("v-uni-view",{staticClass:"f-row"},[e("v-uni-view",{staticClass:"cdlht"},[t._v("每人限领次数:")]),t._v(t._s(1==t.dataInfo.isMax?"不限次数":"每人限领"+t.dataInfo.maxNum+"次"))],1)],1),e("v-uni-view",{staticClass:"f-row"},[e("v-uni-view",{staticClass:"yd f-g-0"}),e("v-uni-view",{staticClass:"f-row"},[e("v-uni-view",{staticClass:"cdlht"},[t._v("领取人限制:")]),t._v(t._s(1==t.dataInfo.memberType?"所有人均可领":2==t.dataInfo.memberType?"会员可领":"指定标签用户可领"))],1)],1)],1)],1!=t.query.nobtn?e("v-uni-view",{staticClass:"f-c mb10"},[e("v-uni-button",{staticClass:"ljsy cf f32 bs15 f-c",style:{background:t.dataInfo.useState>2?"#ddd":t.color},attrs:{disabled:t.loading},on:{click:function(a){arguments[0]=a=t.$handleEvent(a),t.ljsy.apply(void 0,arguments)}}},[t._v(t._s(t.anlx))])],1):t._e()],2)],1),e("v-uni-view",{staticClass:"p-r p03"},[e("v-uni-view",{staticClass:"p30"},[e("v-uni-view",{staticClass:"f-x-bt",class:{active:t.active},on:{click:function(a){a.stopPropagation(),arguments[0]=a=t.$handleEvent(a),t.active=!t.active}}},[e("v-uni-view",[t._v("注意事项")]),e("v-uni-text",{staticClass:"iconfont iconright",class:{jtactive:t.active}})],1),e("v-uni-view",{staticClass:"coubb o-h",class:{cactive:t.active}},[e("v-uni-view",{staticClass:"coubbv pt10",class:{show:t.active}},[e("mg-rtext",{attrs:{type:"2",content:t.dataInfo.details||t.dataInfo.couponDetails}})],1)],1)],1),e("v-uni-view",{staticClass:"ydl p-a",style:{background:t.color}}),e("v-uni-view",{staticClass:"ydr p-a",style:{background:t.color}})],1)],1)],1)],1)},n=[]},e0af:function(t,a,e){var i=e("e5f0");"string"===typeof i&&(i=[[t.i,i,""]]),i.locals&&(t.exports=i.locals);var s=e("4f06").default;s("02ef16dc",i,!0,{sourceMap:!1,shadowMode:!1})},e5f0:function(t,a,e){var i=e("24fb");a=i(!1),a.push([t.i,".cl-main[data-v-22272220]{padding:%?50?% %?30?%}.timg[data-v-22272220]{width:%?120?%;height:%?120?%;margin:0 auto}.cl-bd[data-v-22272220]{padding:%?70?% 0 0;margin-top:%?-60?%;-webkit-border-radius:%?12?%;border-radius:%?12?%}.bbd[data-v-22272220]{border-bottom:1px dashed #ebebed}.yd[data-v-22272220]{width:%?6?%;height:%?6?%;-webkit-border-radius:50%;border-radius:50%;background:#999;margin:%?17?% %?12?% 0 %?5?%}.ljsy[data-v-22272220]{width:60%;height:%?75?%}.ydl[data-v-22272220],\n.ydr[data-v-22272220]{width:%?40?%;height:%?40?%;-webkit-border-radius:50%;border-radius:50%;top:%?-20?%}.ydl[data-v-22272220]{left:%?-17?%}.ydr[data-v-22272220]{right:%?-17?%}.jtactive[data-v-22272220]{-webkit-transform:rotate(90deg);transform:rotate(90deg)}.coubb[data-v-22272220]{height:0;-webkit-transition:all .3s ease-in-out;transition:all .3s ease-in-out}.coubb.cactive[data-v-22272220]{height:auto}.coubbv[data-v-22272220]{opacity:0;-webkit-transform:translateY(-50%);transform:translateY(-50%);-webkit-transition:.3s ease-in-out;transition:.3s ease-in-out}.coubbv.show[data-v-22272220]{opacity:1;-webkit-transform:translateY(0);transform:translateY(0)}.cdlht[data-v-22272220]{min-width:%?170?%}",""]),t.exports=a}}]);