1 line
13 KiB
JavaScript
1 line
13 KiB
JavaScript
(window["webpackJsonp"]=window["webpackJsonp"]||[]).push([["chunk-2c9880c5","chunk-2d0dd411"],{"627f6":function(t,e,o){"use strict";o.r(e);var n=function(){var t=this,e=t.$createElement,o=t._self._c||e;return o("div",{attrs:{id:"qr_coupon"}},[o("c-title",{attrs:{hide:!1,text:"优惠券"}}),o("div",{staticClass:"color-block"}),o("div",{staticClass:"content"},[o("div",{staticClass:"info"},[o("div",{staticClass:"avator"},[o("img",{attrs:{src:t.icon}})]),o("div",{staticClass:"title"},[t._v(t._s(t.datas.name))]),1==t.datas.coupon_method?o("div",{staticClass:"money"},[o("span",[t._v(t._s(t.$i18n.t("money")))]),o("span",[t._v(t._s(t.datas.deduct))])]):t._e(),2==t.datas.coupon_method?o("div",{staticClass:"money"},[o("span",[t._v(t._s(t.datas.discount)+"折")])]):t._e(),o("div",{staticClass:"manzu"},[t._v("满"+t._s(t.datas.enough)+"可用")]),o("div",{staticClass:"time"},[o("div",{staticClass:"text"},[o("span",[t._v("有效期")]),o("span",[t._v(t._s(t.time_start)+" - "+t._s(t.time_end))])]),t.coupon_sn?o("div",{staticClass:"text addtext"},[o("span",[t._v("使用范围")]),o("span",[t._v(t._s(t.datas.coupon_type_name))])]):t._e()]),t.coupon_sn?["-1"!=t.datas.bind_coupon_wait_get?o("div",{staticClass:"btn",on:{click:t.selectedcoupon}},[t._v(" 立即领取 ")]):o("div",{staticClass:"btn btnNone"},[t._v(" 立即领取 ")])]:[3==t.datas.api_availability?o("div",{staticClass:"btn",staticStyle:{"background-color":"#d4d4d4"},on:{click:t.selectedcoupon}},[t._v(" 立即领取 ")]):o("div",{staticClass:"btn",on:{click:t.selectedcoupon}},[t._v(" 立即领取 ")]),o("div",{directives:[{name:"clipboard",rawName:"v-clipboard:copy",value:t.copy_value,expression:"copy_value",arg:"copy"},{name:"clipboard",rawName:"v-clipboard:success",value:t.onCopy,expression:"onCopy",arg:"success"}],staticClass:"btn btn-copy",on:{click:function(t){t.stopPropagation()}}},[t._v(" 复制文案 ")])]],2),t.goods.length>0&&!t.coupon_sn?o("div",{staticClass:"goods"},[o("div",{staticClass:"tit"},[t._v("适用商品")]),t._l(t.goods,(function(e){return o("div",{key:e.id,staticClass:"good",on:{click:function(o){return t.toDetail(e.id)}}},[o("div",{staticClass:"image"},[o("img",{attrs:{src:e.thumb}})]),o("div",{staticClass:"right"},[o("div",{staticClass:"word"},[t._v(t._s(e.title))]),o("div",{staticClass:"discount-one-b"},[o("div",{staticClass:"now-price"},[t._v("现价:"+t._s(t.$i18n.t("money"))+t._s(e.price))]),o("div",{staticClass:"discount-price"},[t._v("券后价:"+t._s(t.$i18n.t("money"))+t._s(e.deduct_price.toFixed(2)))])])])])}))],2):t._e(),t.datas.description&&!t.coupon_sn?o("div",{staticClass:"explain"},[o("div",{staticClass:"title"},[t._v("领券说明")]),o("div",{staticClass:"detail",domProps:{innerHTML:t._s(t.datas.content||t.datas.description)}})]):t._e()]),t.coupon_sn?o("div",{staticClass:"posbtn",on:{click:t.toStore}},[o("img",{attrs:{src:"https://mini-app-img-1251768088.cos.ap-guangzhou.myqcloud.com/coupons_mycouponsbg@2x.png",alt:""}}),o("div",[t._v("我的优惠券")])]):t._e()],1)},i=[],a=(o("e7e5"),o("d399")),s=(o("ac1f"),o("5319"),o("4d63"),o("c607"),o("2c3e"),o("25f0"),o("14d9"),o("8135")),d=o("6968"),r={data:function(){return{goods:{},datas:{},name:"",time_start:"",time_end:"",shop_logo:"",copy_value:"",icon:"",coupon_sn:""}},components:{cTitle:d["a"]},mounted:function(){},methods:{timestampToTime:function(t){var e=new Date(1e3*t),o=e.getFullYear()+"-",n=(e.getMonth()+1<10?"0"+(e.getMonth()+1):e.getMonth()+1)+"-",i=this.change(e.getDate())+" ",a=this.change(e.getHours())+":",s=this.change(e.getMinutes());return o+n+i+a+s},change:function(t){return t<10?"0"+t:t},getQueryString:function(t){return decodeURIComponent((new RegExp("[?|&]"+t+"=([^&;]+?)(&|#|;|$)").exec(location.href)||[,""])[1].replace(/\+/g,"%20"))||null},toDetail:function(t){this.$router.push(this.fun.getUrl("goods",{id:t}))},getData:function(){var t=this,e={coupon_id:this.$route.params.id};this.$route.params.coupon_sn&&(e.bind_coupon_sn=this.coupon_sn),$http.get("coupon.member-coupon.getGoodsCouponByCouponId",e,"获取中").then((function(e){if(1==e.result){t.datas=e.data,t.goods=e.data.goods,t.icon=e.data.icon,t.time_start=t.datas.time_start.split(" ")[0],t.time_end=t.datas.time_end.split(" ")[0];var o=window.location.href;o=t.fun.isMid(o,window.localStorage.uid),t.goods.length>0&&(t.copy_value=t.goods[0].title+"\r日常价:"+t.goods[0].price+"\r券后价:"+t.goods[0].deduct_price+"\r"+o)}else Object(a["a"])(e.msg)})).catch((function(t){}))},toStore:function(){this.$router.push(this.fun.getUrl("coupon",{}))},selectedcoupon:function(){var t=this,e=Object(s["a"])({scene:3,title:"领取优惠券"});if(e){var o=this,n={coupon_id:this.$route.params.id};this.$route.params.coupon_sn&&(n.bind_coupon_sn=this.coupon_sn),$http.get("coupon.member-coupon.get-coupon",n,"").then((function(e){1==e.result?(Object(a["a"])("领取成功"),1!=o.goods.length||t.coupon_sn?o.$router.push(o.fun.getUrl("coupon",{})):o.toDetail(o.goods[0].id)):e.data.reason?o.$dialog.alert({message:e.data.reason,title:e.msg}):o.$dialog.alert({message:e.msg})}),(function(t){}))}},onCopy:function(){Object(a["a"])({message:"复制成功",position:"bottom",duration:5e3})},initShare:function(){var t=this,e={url:"android"===this.fun.isIosOrAndroid()?window.location.href:window.initUrl,mid:this.fun.getKeyByMid()};$http.post("member.member.wxJsSdkConfig",e).then((function(e){1===e.result&&e.data.config&&t.share(e.data)}),(function(t){}))},shareWeixin:function(){5!=this.fun.getTyep()&&(7!=this.fun.getTyep()?this.$dialog.alert({message:"请点击右上角微信分享"}):this.appSharesinit())},appSharesinit:function(){var t=this,e=document.location.href,o={url:e,i:this.fun.getKeyByI(),type:this.fun.getTyep()};$http.post("member.member.wxJsSdkConfig",o).then((function(e){1==e.result&&t.appShare(e.data)}),(function(t){}))},appShare:function(t){var e=this,o="",n="",i="";o=e.goods[0].title?e.goods[0].title:t.share.title,n=e.goods[0].thumb?e.goods[0].thumb:t.share.icon,i="现价:¥"+e.goods[0].price+" 券后价:¥"+e.goods[0].deduct_price;var a=document.location.href+"&share_tag=2";a=e.fun.isMid(a,t.info.uid),YDB.Share(o,i,n,a,"Sharesback")},share:function(t){var e=this;wx.config(t.config),wx.ready((function(){var o="",n="",i="";o=e.goods[0].title?e.goods[0].title:t.share.title,n=e.goods[0].thumb?e.goods[0].thumb:t.share.icon,i="现价:¥"+e.goods[0].price+" 券后价:¥"+e.goods[0].deduct_price;var s=document.location.href+"&share_tag=2";s=e.fun.isMid(s,t.info.uid),wx.showOptionMenu(),wx.onMenuShareTimeline({title:o,link:s,imgUrl:n,success:function(){Object(a["a"])("分享成功")},cancel:function(){Object(a["a"])("取消分享")}}),wx.onMenuShareAppMessage({title:o,desc:i,link:s,imgUrl:n,type:"link",dataUrl:"",success:function(){Object(a["a"])("分享成功")},cancel:function(){Object(a["a"])("取消分享")}})}))}},activated:function(){this.$route.params.coupon_sn&&(this.coupon_sn=this.$route.params.coupon_sn),this.getData(),this.fun.wxShare("",{},{title:this.goods[0]?this.goods[0].title:"",imgUrl:this.goods[0]?this.goods[0].thumb:"",description:this.goods[0]?"现价:¥"+this.goods[0].price+" 券后价:¥"+this.goods[0].deduct_price:""})}},c=r,l=c,p=(o("d98e"),o("2877")),u=Object(p["a"])(l,n,i,!1,null,"8bd39ae0",null);e["default"]=u.exports},"74e0":function(t,e,o){var n=o("cf02");n.__esModule&&(n=n.default),"string"===typeof n&&(n=[[t.i,n,""]]),n.locals&&(t.exports=n.locals);var i=o("499e").default;i("1e34642a",n,!0,{sourceMap:!1,shadowMode:!1})},8135:function(t,e,o){"use strict";o.d(e,"a",(function(){return n}));o("b64b"),o("14d9");function n(t){var e=JSON.parse(sessionStorage.getItem("validate_page")).drainage_code||{},o=e.drainage_scene,n=e.has_add_employee;return!(o&&!n)||(!(t.scene&&o.indexOf(t.scene)>-1)||(t.type=1,t.url=window.location.href,window.__lendApp__.$router.push(window.__lendApp__.fun.getUrl("critical-customer-share",{scene_data:t},{})),!1))}},cf02:function(t,e,o){var n=o("24fb");e=n(!1),e.push([t.i,".posbtn[data-v-8bd39ae0]{position:fixed;bottom:5rem;right:50%;-webkit-transform:translateX(10rem);transform:translateX(10rem);z-index:999}.posbtn img[data-v-8bd39ae0]{width:3.78rem}.posbtn div[data-v-8bd39ae0]{border-radius:5px;text-align:center;font-size:12px;background:#fb605f;padding:.2rem .3rem;color:#fff;display:-webkit-box;display:-webkit-flex;display:-ms-flexbox;display:flex;-webkit-box-align:center;-webkit-align-items:center;-ms-flex-align:center;align-items:center;-webkit-box-pack:center;-webkit-justify-content:center;-ms-flex-pack:center;justify-content:center}#qr_coupon[data-v-8bd39ae0]{height:100vh;background-color:#fff}#qr_coupon .color-block[data-v-8bd39ae0]{height:9.0625rem;background-color:#fd4e4b;position:absolute;top:0;width:100%}#qr_coupon .content[data-v-8bd39ae0]{background-color:#fff}#qr_coupon .content .info[data-v-8bd39ae0]{background-color:#fff;-webkit-box-shadow:0 .25rem .5rem 0 rgba(0,0,0,.05);box-shadow:0 .25rem .5rem 0 rgba(0,0,0,.05);border-radius:.9375rem;margin:0 .75rem;margin-top:3.5625rem;z-index:2;position:relative;text-align:center;padding-bottom:2rem}#qr_coupon .content .info .avator[data-v-8bd39ae0]{width:4rem;height:4rem;border:.1875rem solid #fff;border-radius:50%;-webkit-box-sizing:border-box;box-sizing:border-box;-webkit-transform:translateY(-50%);transform:translateY(-50%);margin:0 auto}#qr_coupon .content .info .avator img[data-v-8bd39ae0]{width:100%;height:100%;border-radius:50%}#qr_coupon .content .info .title[data-v-8bd39ae0]{font-size:16px;color:#666;-webkit-transform:translateY(-50%);transform:translateY(-50%)}#qr_coupon .content .info .money[data-v-8bd39ae0]{font-size:16px;color:#fd4e4b;margin-top:1.625rem}#qr_coupon .content .info .money span[data-v-8bd39ae0]:last-child{font-size:32px}#qr_coupon .content .info .manzu[data-v-8bd39ae0]{margin-top:1rem;margin-bottom:2.25rem}#qr_coupon .content .info .time[data-v-8bd39ae0]{padding-top:1.25rem;border-top:1px solid #ededed}#qr_coupon .content .info .time .text[data-v-8bd39ae0]{padding:0 .75rem;display:-webkit-box;display:-webkit-flex;display:-ms-flexbox;display:flex;-webkit-box-pack:justify;-webkit-justify-content:space-between;-ms-flex-pack:justify;justify-content:space-between}#qr_coupon .content .info .time .addtext[data-v-8bd39ae0]{margin-top:1.25rem}#qr_coupon .content .info .btn[data-v-8bd39ae0]{width:14.9375rem;height:2.75rem;background-color:#fd4e4b;-webkit-box-shadow:0 0 .5rem 0 rgba(253,78,75,.1);box-shadow:0 0 .5rem 0 rgba(253,78,75,.1);border-radius:1.375rem;display:-webkit-box;display:-webkit-flex;display:-ms-flexbox;display:flex;-webkit-box-align:center;-webkit-align-items:center;-ms-flex-align:center;align-items:center;-webkit-box-pack:center;-webkit-justify-content:center;-ms-flex-pack:center;justify-content:center;color:#fff;margin:0 auto;margin-top:2.375rem}#qr_coupon .content .info .btn-copy[data-v-8bd39ae0]{margin-top:1rem;background-color:#fff;border:1px solid #fd4e4b;color:#fd4e4b}#qr_coupon .content .info .btnNone[data-v-8bd39ae0]{background-color:#c4c4c4!important}#qr_coupon .content .goods[data-v-8bd39ae0]{margin-top:1.875rem;margin-bottom:1rem;padding:0 .75rem}#qr_coupon .content .goods .tit[data-v-8bd39ae0]{margin-bottom:1rem;font-size:16px;text-align:left;font-weight:600}#qr_coupon .content .goods .good[data-v-8bd39ae0]{display:-webkit-box;display:-webkit-flex;display:-ms-flexbox;display:flex;margin-bottom:.5rem}#qr_coupon .content .goods .good .image[data-v-8bd39ae0]{width:6.8125rem;height:6.8125rem;border-radius:.3125rem;margin-right:.75rem}#qr_coupon .content .goods .good .image img[data-v-8bd39ae0]{width:100%;height:100%;border-radius:.3125rem}#qr_coupon .content .goods .good .right[data-v-8bd39ae0]{display:-webkit-box;display:-webkit-flex;display:-ms-flexbox;display:flex;-webkit-box-orient:vertical;-webkit-box-direction:normal;-webkit-flex-direction:column;-ms-flex-direction:column;flex-direction:column;-webkit-box-pack:justify;-webkit-justify-content:space-between;-ms-flex-pack:justify;justify-content:space-between;-webkit-box-flex:1;-webkit-flex:1;-ms-flex:1;flex:1;text-align:left}#qr_coupon .content .goods .good .right .word[data-v-8bd39ae0]{text-overflow:ellipsis;display:-webkit-box;-webkit-box-orient:vertical;-webkit-line-clamp:2;overflow:hidden}#qr_coupon .content .goods .good .right .cash[data-v-8bd39ae0]{color:#ff2c29}#qr_coupon .content .goods .good .right .discount-one-b .now-price[data-v-8bd39ae0]{font-size:.75rem;text-decoration:line-through;vertical-align:middle;color:#888}#qr_coupon .content .goods .good .right .discount-one-b .discount-price[data-v-8bd39ae0]{font-size:.875rem;color:#ff2c29}#qr_coupon .content .explain[data-v-8bd39ae0]{padding:0 .75rem;padding-bottom:1rem}#qr_coupon .content .explain .title[data-v-8bd39ae0]{margin-bottom:1rem;font-size:16px;text-align:left;font-weight:600}#qr_coupon .content .explain .detail[data-v-8bd39ae0]{text-align:left}#qr_coupon .content .explain .detail img[data-v-8bd39ae0]{width:100%}.pcStyle .color-block[data-v-8bd39ae0]{width:375px!important}",""]),t.exports=e},d98e:function(t,e,o){"use strict";o("74e0")}}]); |