(window["webpackJsonp"]=window["webpackJsonp"]||[]).push([["chunk-1b450df6"],{"1cfb":function(t,e,n){"use strict";var a=n("31eb"),i=n.n(a);i.a},"31eb":function(t,e,n){},"57ec":function(t,e,n){"use strict";n.r(e);var a=function(){var t=this,e=t.$createElement,n=t._self._c||e;return n("div",[t.zsImg?n("img",{ref:"zsImg",staticClass:"creatImg",attrs:{src:t.zsImg}}):n("div",{ref:"teacherContent",staticClass:"teacherContent",style:{height:t.height-40+"px"}},[n("div",{staticClass:"body",style:{height:t.height-40+"px"}},[n("div",[n("br"),n("img",{staticClass:"logo",attrs:{src:t.logoImg}})]),t.agent.userId?[n("vue-qr",{staticClass:"codeImg",attrs:{logoSrc:t.agent.photo,text:t.codeValue,size:400,dotScale:1,logoScale:.15,margin:0,colorLight:"#e9efea",colorDark:"#000",logoCornerRadius:10,logoMargin:10,logoBackgroundColor:"#e9efea"}}),n("div",{staticClass:"title"},[t._v("\n 培训师授权证书\n ")]),n("div",{staticClass:"content_top"},[n("div",{staticClass:"left"},[n("p",[t._v("兹授权:"),n("input",{domProps:{value:t.agent.name}})]),n("p",[t._v("微信号:"),n("input",{domProps:{value:t.agent.weixinhao}})]),n("p",[t._v("手机号:"),n("input",{domProps:{value:t.agent.mobile}})])]),n("div",{staticClass:"right"},[n("img",{staticStyle:{width:"80%","max-width":"200px","margin-top":"20px"},attrs:{src:t.agent.photo}})])]),n("div",{staticClass:"content",domProps:{innerHTML:t._s(t.tpContent)}}),n("div",{staticClass:"content",staticStyle:{"text-indent":"0em"}},[n("div",[t._v("授权编号:"),n("input",{domProps:{value:"VMT-"+t.agent.userId}})]),t._m(0),n("div",[t._v("授权日期:"),n("input",{domProps:{value:t.agent.issueDate}})])]),n("div",{staticClass:"zhang"},[n("img",{attrs:{src:t.zhang}})])]:t._e(),t.isNO?[n("br"),n("br"),n("br"),n("br"),n("h2",{staticStyle:{color:"#dd424a"}},[t._v(t._s(t.keyword))]),n("h1",[t._v("查无记录")])]:t._e(),t.isBlackList?[n("br"),n("br"),n("br"),n("br"),n("h2",{staticStyle:{color:"#dd424a"}},[t._v(t._s(t.keyword))]),n("h3",[t._v("该持有人授权已无效")])]:t._e()],2),t.agent.userId?n("div",{staticClass:"watermark"},t._l(20,function(e){return n("ul",{key:e},t._l(10,function(e){return n("li",{key:e},[t._v(t._s(t.agent.name))])}),0)}),0):t._e()])])},i=[function(){var t=this,e=t.$createElement,n=t._self._c||e;return n("div",[t._v("授权单位:"),n("input",{attrs:{value:"湖南旻一科技有限公司"}})])}],o=(n("34ef"),n("4917"),n("28a5"),n("0222")),s=n.n(o),r=n("76a0"),c=n("aadd"),l=n("658f"),u=n.n(l),d=n("c0e9"),g=n.n(d),h=n("e876"),m={name:"Agent",components:{parseTime:c["a"],vueQr:u.a},data:function(){return{zsImg:!1,logoImg:s.a,keyword:"",height:document.documentElement.clientHeight,agent:{},isNO:!1,isBlackList:!1,watermark:"",tpContent:"我公司旗下品牌VMESHOU(唯蜜瘦)初级培训师,负责我公司内部代理商培训。",zhang:n("4550"),codeValue:"http://cx.vmeshou.com/teacher/"+this.$route.params.keyword}},destroyed:function(){window.removeEventListener("resize",this.getHeight())},created:function(){var t=this;setTimeout(function(){t.getHeight()},2e3),this.query()},methods:{query:function(){var t=this;r["Indicator"].open({text:"查询中...",spinnerType:"fading-circle"});var e=this.$route.params.keyword;if(this.keyword=e,console.log(e),""==e||void 0==e)return setTimeout(function(){r["Indicator"].close()},2e3),!1;var n=this;return new Promise(function(a,i){Object(h["c"])(e).then(function(e){if(0!=e.resp_code&&(t.isNO=!0,setTimeout(function(){r["Indicator"].close()},1e3)),e.datas){var a=e.datas;if("normal"!=a.status)return t.isBlackList=!0,setTimeout(function(){r["Indicator"].close()},1e3),!1;t.agent=a,a.tpContent&&""!=a.tpContent&&(t.tpContent=a.tpContent),t.codeValue="http://cx.vmeshou.com/teacher/"+a.userId,console.log(a),setTimeout(function(){n.makeImg()},1e3)}else t.isNO=!0,setTimeout(function(){r["Indicator"].close()},1e3)}).catch(function(t){return r["Indicator"].close(),t.resp_msg?Object(r["MessageBox"])("出错",t.resp_msg):Object(r["MessageBox"])("出错",t)})})},getHeight:function(){this.height=document.documentElement.clientHeight},startDownloadFace:function(){if(this.agent&&""!=this.agent.avatar){var t=this.agent.avatar,e=new Image;e.crossOrigin="Anonymous",e.addEventListener("load",function(){var t=document.createElement("canvas"),n=t.getContext("2d");t.width=e.width,t.height=e.height,n.drawImage(e,0,0);var a=t.toDataURL("image/png");this.face=a},!1),e.src=t}},dataURLToBlob:function(t){var e=t.split(","),n=e[0].match(/:(.*?);/)[1],a=atob(e[1]),i=a.length,o=new Uint8Array(i);while(i--)o[i]=a.charCodeAt(i);return new Blob([o],{type:n})},makeImg:function(){r["Indicator"].open({text:"证书请求中...",spinnerType:"fading-circle"});var t=this.$refs["teacherContent"],e=this;document.createElement("a");g()(t,{logging:!1,useCORS:!0}).then(function(t){r["Indicator"].close();var n=t.toDataURL("image/png");e.zsImg=n})}}},v=m,p=(n("1cfb"),n("2877")),f=Object(p["a"])(v,a,i,!1,null,null,null);e["default"]=f.exports}}]);