bztang-admin/addons/yun_shop/static/app/js/chunk-59b797aa.ef16c6a6.js

1 line
11 KiB
JavaScript
Raw Blame History

This file contains ambiguous Unicode characters

This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.

(window["webpackJsonp"]=window["webpackJsonp"]||[]).push([["chunk-59b797aa"],{"369d":function(t,o,e){"use strict";e("7941")},"627f6":function(t,o,e){"use strict";e.r(o);var i=function(){var t=this,o=t.$createElement,e=t._self._c||o;return e("div",{attrs:{id:"qr_coupon"}},[e("c-title",{attrs:{hide:!1,text:"优惠券"}}),e("div",{staticClass:"color-block"}),e("div",{staticClass:"content"},[e("div",{staticClass:"info"},[e("div",{staticClass:"avator"},[e("img",{attrs:{src:t.icon}})]),e("div",{staticClass:"title"},[t._v(t._s(t.datas.name))]),1==t.datas.coupon_method?e("div",{staticClass:"money"},[e("span",[t._v(t._s(t.$i18n.t("money")))]),e("span",[t._v(t._s(t.datas.deduct))])]):t._e(),2==t.datas.coupon_method?e("div",{staticClass:"money"},[e("span",[t._v(t._s(t.datas.discount)+"折")])]):t._e(),e("div",{staticClass:"manzu"},[t._v("满"+t._s(t.datas.enough)+"可用")]),e("div",{staticClass:"time"},[e("div",{staticClass:"text"},[e("span",[t._v("有效期")]),e("span",[t._v(t._s(t.time_start)+" - "+t._s(t.time_end))])])]),3==t.datas.api_availability?e("div",{staticClass:"btn",staticStyle:{"background-color":"#d4d4d4"},on:{click:t.selectedcoupon}},[t._v(" 立即领取 ")]):e("div",{staticClass:"btn",on:{click:t.selectedcoupon}},[t._v(" 立即领取 ")]),e("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(" 复制文案 ")])]),t.goods.length>0?e("div",{staticClass:"goods"},[e("div",{staticClass:"tit"},[t._v("适用商品")]),t._l(t.goods,(function(o){return e("div",{key:o.id,staticClass:"good",on:{click:function(e){return t.toDetail(o.id)}}},[e("div",{staticClass:"image"},[e("img",{attrs:{src:o.thumb}})]),e("div",{staticClass:"right"},[e("div",{staticClass:"word"},[t._v(t._s(o.title))]),e("div",{staticClass:"discount-one-b"},[e("div",{staticClass:"now-price"},[t._v("现价:"+t._s(t.$i18n.t("money"))+t._s(o.price))]),e("div",{staticClass:"discount-price"},[t._v("券后价:"+t._s(t.$i18n.t("money"))+t._s(o.deduct_price.toFixed(2)))])])])])}))],2):t._e(),t.datas.description?e("div",{staticClass:"explain"},[e("div",{staticClass:"title"},[t._v("领券说明")]),e("div",{staticClass:"detail",domProps:{innerHTML:t._s(t.datas.content||t.datas.description)}})]):t._e()])],1)},n=[],a=(e("e7e5"),e("d399")),s=(e("ac1f"),e("5319"),e("4d63"),e("c607"),e("2c3e"),e("25f0"),e("1276"),e("6968")),c={data:function(){return{goods:{},datas:{},name:"",time_start:"",time_end:"",shop_logo:"",copy_value:"",icon:""}},components:{cTitle:s["a"]},mounted:function(){},methods:{timestampToTime:function(t){var o=new Date(1e3*t),e=o.getFullYear()+"-",i=(o.getMonth()+1<10?"0"+(o.getMonth()+1):o.getMonth()+1)+"-",n=this.change(o.getDate())+" ",a=this.change(o.getHours())+":",s=this.change(o.getMinutes());return e+i+n+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,o={coupon_id:this.$route.params.id};$http.get("coupon.member-coupon.getGoodsCouponByCouponId",o,"获取中").then((function(o){if(1==o.result){t.datas=o.data,t.goods=o.data.goods,t.icon=o.data.icon,t.time_start=t.datas.time_start.split(" ")[0],t.time_end=t.datas.time_end.split(" ")[0];var e=window.location.href;e=t.fun.isMid(e,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"+e)}else Object(a["a"])(o.msg)})).catch((function(t){}))},selectedcoupon:function(){var t=this;$http.get("coupon.member-coupon.get-coupon",{coupon_id:this.$route.params.id},"").then((function(o){1==o.result?(Object(a["a"])("领取成功"),1==t.goods.length&&t.toDetail(t.goods[0].id)):o.data.reason?t.$dialog.alert({message:o.data.reason,title:o.msg}):t.$dialog.alert({message:o.msg})}),(function(t){}))},onCopy:function(){Object(a["a"])({message:"复制成功",position:"bottom",duration:5e3})},initShare:function(){var t=this,o={url:"android"===this.fun.isIosOrAndroid()?window.location.href:window.initUrl,mid:this.fun.getKeyByMid()};$http.post("member.member.wxJsSdkConfig",o).then((function(o){1===o.result&&o.data.config&&t.share(o.data)}),(function(t){}))},shareWeixin:function(){5!=this.fun.getTyep()&&(7!=this.fun.getTyep()?this.$dialog.alert({message:"请点击右上角微信分享"}):this.appSharesinit())},appSharesinit:function(){var t=this,o=document.location.href,e={url:o,i:this.fun.getKeyByI(),type:this.fun.getTyep()};$http.post("member.member.wxJsSdkConfig",e).then((function(o){1==o.result&&t.appShare(o.data)}),(function(t){}))},appShare:function(t){var o=this,e="",i="",n="";e=o.goods[0].title?o.goods[0].title:t.share.title,i=o.goods[0].thumb?o.goods[0].thumb:t.share.icon,n="现价:¥"+o.goods[0].price+" 券后价:¥"+o.goods[0].deduct_price;var a=document.location.href+"&share_tag=2";a=o.fun.isMid(a,t.info.uid),YDB.Share(e,n,i,a,"Sharesback")},share:function(t){var o=this;wx.config(t.config),wx.ready((function(){var e="",i="",n="";e=o.goods[0].title?o.goods[0].title:t.share.title,i=o.goods[0].thumb?o.goods[0].thumb:t.share.icon,n="现价:¥"+o.goods[0].price+" 券后价:¥"+o.goods[0].deduct_price;var s=document.location.href+"&share_tag=2";s=o.fun.isMid(s,t.info.uid),wx.showOptionMenu(),wx.onMenuShareTimeline({title:e,link:s,imgUrl:i,success:function(){Object(a["a"])("分享成功")},cancel:function(){Object(a["a"])("取消分享")}}),wx.onMenuShareAppMessage({title:e,desc:n,link:s,imgUrl:i,type:"link",dataUrl:"",success:function(){Object(a["a"])("分享成功")},cancel:function(){Object(a["a"])("取消分享")}})}))}},activated:function(){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:""})}},d=c,r=d,b=(e("369d"),e("2877")),l=Object(b["a"])(r,i,n,!1,null,"03cbbbd0",null);o["default"]=l.exports},"785c":function(t,o,e){var i=e("24fb");o=i(!1),o.push([t.i,"#qr_coupon[data-v-03cbbbd0]{height:100vh;background-color:#fff}#qr_coupon .color-block[data-v-03cbbbd0]{height:9.0625rem;background-color:#fd4e4b;position:absolute;top:0;width:100%}#qr_coupon .content[data-v-03cbbbd0]{background-color:#fff}#qr_coupon .content .info[data-v-03cbbbd0]{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-03cbbbd0]{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-03cbbbd0]{width:100%;height:100%;border-radius:50%}#qr_coupon .content .info .title[data-v-03cbbbd0]{font-size:16px;color:#666;-webkit-transform:translateY(-50%);transform:translateY(-50%)}#qr_coupon .content .info .money[data-v-03cbbbd0]{font-size:16px;color:#fd4e4b;margin-top:1.625rem}#qr_coupon .content .info .money span[data-v-03cbbbd0]:last-child{font-size:32px}#qr_coupon .content .info .manzu[data-v-03cbbbd0]{margin-top:1rem;margin-bottom:2.25rem}#qr_coupon .content .info .time[data-v-03cbbbd0]{padding-top:1.25rem;border-top:1px solid #ededed}#qr_coupon .content .info .time .text[data-v-03cbbbd0]{padding:0 .75rem;-webkit-box-pack:justify;-webkit-justify-content:space-between;-ms-flex-pack:justify;justify-content:space-between}#qr_coupon .content .info .btn[data-v-03cbbbd0],#qr_coupon .content .info .time .text[data-v-03cbbbd0]{display:-webkit-box;display:-webkit-flex;display:-ms-flexbox;display:flex}#qr_coupon .content .info .btn[data-v-03cbbbd0]{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;-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-03cbbbd0]{margin-top:1rem;background-color:#fff;border:1px solid #fd4e4b;color:#fd4e4b}#qr_coupon .content .goods[data-v-03cbbbd0]{margin-top:1.875rem;margin-bottom:1rem;padding:0 .75rem}#qr_coupon .content .goods .tit[data-v-03cbbbd0]{margin-bottom:1rem;font-size:16px;text-align:left;font-weight:600}#qr_coupon .content .goods .good[data-v-03cbbbd0]{display:-webkit-box;display:-webkit-flex;display:-ms-flexbox;display:flex;margin-bottom:.5rem}#qr_coupon .content .goods .good .image[data-v-03cbbbd0]{width:6.8125rem;height:6.8125rem;border-radius:.3125rem;margin-right:.75rem}#qr_coupon .content .goods .good .image img[data-v-03cbbbd0]{width:100%;height:100%;border-radius:.3125rem}#qr_coupon .content .goods .good .right[data-v-03cbbbd0]{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-03cbbbd0]{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-03cbbbd0]{color:#ff2c29}#qr_coupon .content .goods .good .right .discount-one-b .now-price[data-v-03cbbbd0]{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-03cbbbd0]{font-size:.875rem;color:#ff2c29}#qr_coupon .content .explain[data-v-03cbbbd0]{padding:0 .75rem;padding-bottom:1rem}#qr_coupon .content .explain .title[data-v-03cbbbd0]{margin-bottom:1rem;font-size:16px;text-align:left;font-weight:600}#qr_coupon .content .explain .detail[data-v-03cbbbd0]{text-align:left}#qr_coupon .content .explain .detail img[data-v-03cbbbd0]{width:100%}.pcStyle .color-block[data-v-03cbbbd0]{width:375px!important}",""]),t.exports=o},7941:function(t,o,e){var i=e("785c");i.__esModule&&(i=i.default),"string"===typeof i&&(i=[[t.i,i,""]]),i.locals&&(t.exports=i.locals);var n=e("499e").default;n("01f17926",i,!0,{sourceMap:!1,shadowMode:!1})}}]);