bztang-admin/addons/yun_shop/static/app/js/chunk-583501f4.06bd1bf6.js

1 line
3.5 KiB
JavaScript

(window["webpackJsonp"]=window["webpackJsonp"]||[]).push([["chunk-583501f4"],{"37af":function(e,t,i){"use strict";i("fad1")},"4c2b":function(e,t,i){var a=i("24fb");t=a(!1),t.push([e.i,".topBox[data-v-6dee6d07]{display:-webkit-box;display:-webkit-flex;display:-ms-flexbox;display:flex;-webkit-box-pack:center;-webkit-justify-content:center;-ms-flex-pack:center;justify-content:center;-webkit-box-align:center;-webkit-align-items:center;-ms-flex-align:center;align-items:center;width:17.25rem;margin:1rem auto}.topBox img[data-v-6dee6d07]{width:3.125rem;height:3.125rem;border-radius:100%;margin:0 .5rem 0 0}.topBox span[data-v-6dee6d07]{display:inline-block;color:#515a63;font-size:18px;overflow:hidden;text-overflow:ellipsis;white-space:nowrap;text-align:left}.ewmBox[data-v-6dee6d07]{width:17.25rem;border:1px solid #e4e4e4;border-radius:5%;background:#fff;overflow:hidden;margin:2rem auto}.ewmBox p[data-v-6dee6d07]{color:#666;margin:.3rem auto 0}.ewmBox #qrccode-canvas[data-v-6dee6d07]{width:16.875rem!important;height:16.875rem!important}",""]),e.exports=t},"927b1":function(e,t,i){"use strict";i.r(t);var a=function(){var e=this,t=e.$createElement,i=e._self._c||t;return i("div",[i("c-title",{attrs:{hide:!1,text:e.title}}),e.info.avatar_image?i("div",{staticClass:"topBox"},[i("img",{attrs:{src:e.info.avatar_image,alt:""}}),i("span",[e._v(e._s(e.info.username))])]):e._e(),i("div",{directives:[{name:"show",rawName:"v-show",value:e.success,expression:"success"}],staticClass:"ewmBox"},[i("canvas",{attrs:{id:"qrccode-canvas"}})]),i("div",[i("p",{directives:[{name:"show",rawName:"v-show",value:"会员卡号"===e.title,expression:"title==='会员卡号'"}],staticStyle:{"font-size":"16px","font-weight":"bold","margin-bottom":"1rem"}},[e._v(e._s(e.info.uid))]),i("p",{staticStyle:{"font-size":"16px","font-weight":"bold"}},[e._v("向收银员出示"+e._s(e.title))])])],1)},n=[],o=(i("e7e5"),i("d399")),s=(i("b0c0"),i("d3b7"),i("25f0"),i("d055")),r=i.n(s),c=i("6968"),d="",l={data:function(){return{info:{},title:"",success:!1,timer:null}},mounted:function(){this.$nextTick((function(){d=document.getElementById("qrccode-canvas")}))},activated:function(){this.info={},this.title="",this.success=!1,"codePage"===this.$route.name?(this.title="支付码",this.getPayCode()):(this.title="会员卡号",this.getMemberCode())},deactivated:function(){this.timer&&clearInterval(this.timer)},methods:{freshCode:function(){var e=this;this.timer=setInterval((function(){e.getPayCode()}),6e4)},getMemberCode:function(){var e=this;$http.get("member.member-qr-code.member-code",{},"loading").then((function(t){1===t.result?(e.info=t.data,e.$nextTick((function(){this.createQrc(this.info.uid.toString())}))):Object(o["a"])(t.msg)}),(function(e){Object(o["a"])(e.msg)}))},getPayCode:function(){var e=this;$http.get("member.member-qr-code.pay-code",{},"loading").then((function(t){1===t.result?(e.info=t.data,e.timer||e.freshCode(),e.$nextTick((function(){this.createQrc(this.info.code)}))):(e.timer&&clearInterval(e.timer),Object(o["a"])(t.msg))}),(function(e){this.timer&&clearInterval(this.timer),Object(o["a"])(e.msg)}))},createQrc:function(e){var t=this;r.a.toCanvas(d,e,(function(e){e||(t.success=!0)}))}},components:{cTitle:c["a"]}},m=l,f=(i("37af"),i("2877")),u=Object(f["a"])(m,a,n,!1,null,"6dee6d07",null);t["default"]=u.exports},fad1:function(e,t,i){var a=i("4c2b");a.__esModule&&(a=a.default),"string"===typeof a&&(a=[[e.i,a,""]]),a.locals&&(e.exports=a.locals);var n=i("499e").default;n("57936fb0",a,!0,{sourceMap:!1,shadowMode:!1})}}]);