1 line
7.0 KiB
JavaScript
1 line
7.0 KiB
JavaScript
(window["webpackJsonp"]=window["webpackJsonp"]||[]).push([["chunk-3e798ae8"],{3082:function(t,o,e){var n=e("24fb");o=n(!1),o.push([t.i,"#qr_coupon[data-v-95f2f69c]{height:100vh;background-color:#fff}#qr_coupon .color-block[data-v-95f2f69c]{height:7.0625rem;background-color:#fd4e4b;position:absolute;top:0;width:100%}#qr_coupon .content[data-v-95f2f69c]{background-color:#fff}#qr_coupon .content .info[data-v-95f2f69c]{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:9999;position:relative;text-align:center;padding-bottom:2rem}#qr_coupon .content .info .avator[data-v-95f2f69c]{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-95f2f69c]{width:100%;height:100%;border-radius:50%}#qr_coupon .content .info .title[data-v-95f2f69c]{font-size:16px;color:#666}#qr_coupon .content .info .money[data-v-95f2f69c]{font-size:16px;color:#fd4e4b;margin-top:1.625rem}#qr_coupon .content .info .money span[data-v-95f2f69c]:last-child{font-size:32px}#qr_coupon .content .info .manzu[data-v-95f2f69c]{margin-top:1rem;margin-bottom:2.25rem}#qr_coupon .content .info .time[data-v-95f2f69c]{padding-top:1.25rem;border-top:1px solid #ededed}#qr_coupon .content .info .time .text[data-v-95f2f69c]{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-95f2f69c],#qr_coupon .content .info .time .text[data-v-95f2f69c]{display:-webkit-box;display:-webkit-flex;display:-ms-flexbox;display:flex}#qr_coupon .content .info .btn[data-v-95f2f69c]{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 .goods[data-v-95f2f69c]{margin-top:1.875rem;padding:0 .75rem}#qr_coupon .content .goods .tit[data-v-95f2f69c]{margin-bottom:1rem;font-size:16px;text-align:left}#qr_coupon .content .goods .good[data-v-95f2f69c]{display:-webkit-box;display:-webkit-flex;display:-ms-flexbox;display:flex}#qr_coupon .content .goods .good .image[data-v-95f2f69c]{width:6.8125rem;height:6.8125rem;border-radius:.3125rem;margin-right:.75rem}#qr_coupon .content .goods .good .image img[data-v-95f2f69c]{width:100%;height:100%;border-radius:.3125rem}#qr_coupon .content .goods .good .right[data-v-95f2f69c]{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-95f2f69c]{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-95f2f69c]{color:#ff2c29}",""]),t.exports=o},"76ad":function(t,o,e){"use strict";e.r(o);var n=function(){var t=this,o=t.$createElement,e=t._self._c||o;return t.coupon.name&&t.status?e("div",{attrs:{id:"qr_coupon"}},[e("c-title",{attrs:{hide:!1,text:"优惠券二维码"}}),e("div",{staticClass:"color-block set-pc-styleLeft"}),e("div",{staticClass:"content"},[e("div",{staticClass:"info"},[e("div",{staticClass:"avator"},[e("img",{attrs:{src:t.shop_logo}})]),e("div",{staticClass:"title"},[t._v(t._s(t.coupon.name))]),t.coupon.deduct?e("div",{staticClass:"money"},[e("span",[t._v(t._s(t.$i18n.t("money")))]),e("span",[t._v(t._s(t.coupon.deduct))])]):t._e(),t.coupon.deduct_status?e("div",{staticClass:"manzu"},[t._v(t._s(t.coupon.deduct_status))]):t._e(),e("div",{staticClass:"time"},[e("div",{staticClass:"text"},[e("span",[t._v("有效期")]),e("span",[t._v(t._s(t.timestampToTime(t.coupon.start))+"-"+t._s(t.timestampToTime(t.coupon.end)))])])]),1==t.coupon.coupon_status?e("div",{staticClass:"btn",staticStyle:{"background-color":"#d4d4d4"}},[t._v(t._s(t.coupon.status_name))]):t._e(),0==t.coupon.coupon_status?e("div",{staticClass:"btn",on:{click:t.toDetail}},[t._v(t._s(t.coupon.status_name))]):t._e()]),e("div",{staticClass:"goods"},[e("div",{staticClass:"tit"},[t._v(t._s(t.coupon.usageLimit))]),e("div",{staticClass:"good"},[e("div",{staticClass:"image",on:{click:t.toDetail}},[e("img",{attrs:{src:t.goods.thumb}})]),e("div",{staticClass:"right"},[e("div",{staticClass:"word"},[t._v(t._s(t.goods.title))]),e("div",{staticClass:"cash"},[t._v(t._s(t.$i18n.t("money"))+t._s(t.goods.price))])])])])])],1):t._e()},i=[],a=(e("e7e5"),e("d399")),s=(e("ac1f"),e("5319"),e("4d63"),e("c607"),e("2c3e"),e("25f0"),e("14d9"),e("9911"),e("6968")),c={data:function(){return{status:!1,goods:{},coupon:{},shop_logo:""}},components:{cTitle:s["a"]},mounted:function(){},methods:{timestampToTime:function(t){if("string"==typeof t)return t;var o=new Date(1e3*t),e=o.getFullYear()+"-",n=(o.getMonth()+1<10?"0"+(o.getMonth()+1):o.getMonth()+1)+"-",i=this.change(o.getDate())+" ",a=this.change(o.getHours())+":",s=this.change(o.getMinutes());return e+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(){if(0==this.goods.status)return Object(a["a"])("商品已下架"),void this.$router.push(this.fun.getUrl("home"));this.$router.push(this.fun.getUrl("goods",{id:this.goods.id}))},getData:function(){var t=this,o={goods_id:this.getQueryString("goods_id"),member_coupon_id:this.getQueryString("member_coupon")};$http.get("plugin.coupon-qr.api.index.index",o,"获取中").then((function(o){if(1==o.result){if(t.coupon=o.data.coupon,t.goods=o.data.goods,t.shop_logo=o.data.shop_logo,t.coupon.link)return void t.$dialog.confirm({message:"商品已下架,是否跳转到其他页面"}).then((function(){window.location.href=t.coupon.link})).catch((function(){t.status=!0}));t.coupon.link||(t.status=!0),1==t.coupon.coupon_status&&1==t.goods.status&&(t.status=!0,Object(a["a"])("优惠券已被领取"),t.$router.push(t.fun.getUrl("goods",{id:t.goods.id})))}else Object(a["a"])(o.msg)})).catch((function(t){}))}},activated:function(){this.getData()}},r=c,d=r,f=(e("df8f"),e("2877")),u=Object(f["a"])(d,n,i,!1,null,"95f2f69c",null);o["default"]=u.exports},df8f:function(t,o,e){"use strict";e("ea75")},ea75:function(t,o,e){var n=e("3082");n.__esModule&&(n=n.default),"string"===typeof n&&(n=[[t.i,n,""]]),n.locals&&(t.exports=n.locals);var i=e("499e").default;i("4c81e429",n,!0,{sourceMap:!1,shadowMode:!1})}}]); |