1 line
4.1 KiB
JavaScript
1 line
4.1 KiB
JavaScript
(window["webpackJsonp"]=window["webpackJsonp"]||[]).push([["chunk-14a188fe"],{"8dca":function(t,e,a){"use strict";a("ab79")},"992d":function(t,e,a){"use strict";a.r(e);var i=function(){var t=this,e=t.$createElement,a=t._self._c||e;return a("div",{attrs:{id:"wechat_card"}},[a("c-title",{attrs:{hide:!1,text:"领取会员卡"}}),t.ticket.color?t._e():a("div",{staticClass:"image",style:{backgroundImage:"url( "+t.ticket.background_pic+")"}},[a("div",{staticClass:"wrap"},[a("div",{staticClass:"left"},[a("img",{attrs:{src:t.ticket.logo}})]),a("div",{staticClass:"right"},[a("div",{staticClass:"top"},[t._v(t._s(t.ticket.brand_name))]),a("div",[t._v(t._s(t.ticket.title))])])])]),t.ticket.color?a("div",{staticClass:"image",style:{backgroundColor:this.color}},[a("div",{staticClass:"wrap"},[a("div",{staticClass:"left"},[a("img",{attrs:{src:t.ticket.logo}})]),a("div",{staticClass:"right"},[a("div",{staticClass:"top"},[t._v(t._s(t.ticket.brand_name))]),a("div",[t._v(t._s(t.ticket.title))])])])]):t._e(),a("div",{staticClass:"btn",on:{click:t.getType}},[t._v(" 立即领取 ")])],1)},r=[],c=(a("e7e5"),a("d399")),o=a("6968"),s={data:function(){return{ticket:{},color:""}},activated:function(){this.getData()},methods:{getColor:function(t){switch(t){case"Color010":this.color="#63B359";break;case"Color020":this.color="#2C9F67";break;case"Color030":this.color="#509FC9";break;case"Color040":this.color="#5885CF";break;case"Color050":this.color="#9062C0";break;case"Color060":this.color="#D09A45";break;case"Color070":this.color="#E4B138";break;case"Color080":this.color="#EE903C";break;case"Color090":this.color="#DD6549";break;case"Color100":this.color="#CC463D";break;default:break}},getData:function(){var t=this;$http.post("plugin.wx-card-ticket.frontend.controllers.sign.getTicket").then((function(e){1==e.result?(t.ticket=e.data.ticket,t.ticket.color&&t.getColor(t.ticket.color)):Object(c["a"])(e.msg)}))},getType:function(){var t=document.location.href,e={url:t};$http.post("plugin.wx-card-ticket.frontend.controllers.sign.wxJsSdkConfig",e).then((function(t){1==t.result?(wx.config(t.data.js),wx.ready((function(){var e=t.data.cardPackage;wx.addCard({cardList:e,success:function(t){},error:function(t){},fail:function(t){}})}))):Object(c["a"])(t.msg)}))}},components:{cTitle:o["a"]}},l=s,n=l,d=(a("8dca"),a("2877")),b=Object(d["a"])(n,i,r,!1,null,"eb7d1f92",null);e["default"]=b.exports},ab79:function(t,e,a){var i=a("dc0f1");i.__esModule&&(i=i.default),"string"===typeof i&&(i=[[t.i,i,""]]),i.locals&&(t.exports=i.locals);var r=a("499e").default;r("6c156724",i,!0,{sourceMap:!1,shadowMode:!1})},dc0f1:function(t,e,a){var i=a("24fb");e=i(!1),e.push([t.i,"#wechat_card[data-v-eb7d1f92]{background-color:#fff;min-height:100vh}#wechat_card .image[data-v-eb7d1f92]{width:19.375rem;height:10.375rem;padding-top:1rem;padding-left:1rem;border-radius:.7813rem;background-size:100% 100%;margin:0 auto;margin-top:1.5rem}#wechat_card .image .wrap[data-v-eb7d1f92]{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}#wechat_card .image .wrap .left[data-v-eb7d1f92]{width:2.875rem;height:2.875rem;border-radius:50%}#wechat_card .image .wrap .left img[data-v-eb7d1f92]{width:100%;border-radius:50%}#wechat_card .image .wrap .right[data-v-eb7d1f92]{margin-left:.75rem;-webkit-box-orient:vertical;-webkit-box-direction:normal;-webkit-flex-direction:column;-ms-flex-direction:column;flex-direction:column;display:-webkit-box;display:-webkit-flex;display:-ms-flexbox;display:flex;-webkit-box-align:baseline;-webkit-align-items:baseline;-ms-flex-align:baseline;align-items:baseline;color:#fff}#wechat_card .image .wrap .right .top[data-v-eb7d1f92]{font-size:16px}#wechat_card .btn[data-v-eb7d1f92]{width:15.8125rem;height:2.4375rem;background-color:#0eb90d;border-radius:.4375rem;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;margin:0 auto;margin-top:3rem}",""]),t.exports=e}}]); |