(window["webpackJsonp"]=window["webpackJsonp"]||[]).push([["user-pages-distribution-bind-technician"],{"173d":function(t,e,n){"use strict";n.d(e,"b",(function(){return r})),n.d(e,"c",(function(){return o})),n.d(e,"a",(function(){return i}));var i={lPainter:n("577c").default},r=function(){var t=this,e=t.$createElement,n=t._self._c||e;return n("v-uni-view",{staticClass:"pt-md",staticStyle:{"background-color":"#F4F6F7"}},[n("v-uni-view",{staticClass:"hideCanvasView"},[n("l-painter",{ref:"painter",staticClass:"hideCanvas",attrs:{useCORS:!0}})],1),t.src?[n("v-uni-image",{staticClass:"code-img ml-md",attrs:{src:t.src},on:{click:function(e){arguments[0]=e=t.$handleEvent(e),t.previewImage.apply(void 0,arguments)}}}),n("v-uni-view",{staticClass:"space-max-footer"}),n("fix-bottom-button",{attrs:{text:1*t.options.type>0?[{text:"分享设置",type:"cancel"},{text:t.confirmText,type:"confirm"}]:[{text:t.confirmText,type:"confirm"}],bgColor:"#fff",classType:2},on:{cancel:function(e){arguments[0]=e=t.$handleEvent(e),t.$util.goUrl({url:"/user/pages/distribution/share-set"})},confirm:function(e){arguments[0]=e=t.$handleEvent(e),t.toPreviewSave.apply(void 0,arguments)}}})]:t._e()],2)},o=[]},"297e":function(t,e,n){"use strict";var i=n("b08b"),r=n.n(i);r.a},"494c":function(t,e,n){"use strict";n.r(e);var i=n("c9f5"),r=n.n(i);for(var o in i)["default"].indexOf(o)<0&&function(t){n.d(e,t,(function(){return i[t]}))}(o);e["default"]=r.a},7232:function(t,e,n){var i=n("c86c");e=i(!1),e.push([t.i,".code-img[data-v-61f7545c]{width:%?710?%;height:%?1278?%}",""]),t.exports=e},a513:function(t,e,n){"use strict";n.r(e);var i=n("173d"),r=n("494c");for(var o in r)["default"].indexOf(o)<0&&function(t){n.d(e,t,(function(){return r[t]}))}(o);n("297e");var a=n("828b"),s=Object(a["a"])(r["default"],i["b"],i["c"],!1,null,"61f7545c",null,!1,i["a"],void 0);e["default"]=s.exports},b08b:function(t,e,n){var i=n("7232");i.__esModule&&(i=i.default),"string"===typeof i&&(i=[[t.i,i,""]]),i.locals&&(t.exports=i.locals);var r=n("967d").default;r("739b60be",i,!0,{sourceMap:!1,shadowMode:!1})},c9f5:function(t,e,n){"use strict";n("6a54");var i=n("f5bd").default;Object.defineProperty(e,"__esModule",{value:!0}),e.default=void 0;var r=i(n("5de6")),o=i(n("9b1b")),a=i(n("2634")),s=i(n("2fdc")),c=n("8f59"),u={components:{},props:{},data:function(){return{options:{},confirmText:"长按上图保存图片",src:"",admin_id:0,check_admin:{id:0,agent_name:"平台"}}},computed:(0,c.mapState)({primaryColor:function(t){return t.config.configInfo.primaryColor},configInfo:function(t){return t.config.configInfo},userInfo:function(t){return t.user.userInfo},mineInfo:function(t){return t.user.mineInfo}}),onLoad:function(t){var e=this;return(0,s.default)((0,a.default)().mark((function n(){var i,r;return(0,a.default)().wrap((function(n){while(1)switch(n.prev=n.next){case 0:if(e.options=t,!e.$jweixin.isWechat()){n.next=5;break}return n.next=4,e.$jweixin.initJssdk();case 4:e.$jweixin.wxReady((function(){e.$jweixin.hideOptionMenu()}));case 5:return e.$util.showLoading(),n.next=8,e.getConfigInfo();case 8:e.$util.setNavigationBarColor({bg:e.primaryColor}),i="邀请绑定"+e.$t("action.attendantName"),uni.setNavigationBarTitle({title:i}),r=e,setTimeout((function(){r.renderToCanvas()}),1e3);case 13:case"end":return n.stop()}}),n)})))()},methods:(0,o.default)((0,o.default)({},(0,c.mapActions)(["getConfigInfo"])),{},{initRefresh:function(){this.src="",this.$util.showLoading(),this.renderToCanvas(!0)},renderToCanvas:function(){var t=arguments,e=this;return(0,s.default)((0,a.default)().mark((function n(){var i,r,o,s,c,u,f,d,p,l,v,h,x,m,b,g,w,y,C,$;return(0,a.default)().wrap((function(n){while(1)switch(n.prev=n.next){case 0:return i=t.length>0&&void 0!==t[0]&&t[0],r=e,o=r.options.type,s=void 0===o?0:o,c=1==s?"resellerInvCoachQr":"adminCoachQr",u=r.admin_id,f=void 0===u?0:u,d=r.check_admin,p=void 0===d?{}:d,l=p.id,v=void 0===l?0:l,i&&1==s&&v&&(f=v),h=1==s?{admin_id:f}:{},n.next=10,e.$api.mine[c](h);case 10:x=n.sent,m=e.configInfo.bind_technician_img,b=void 0===m?"":m,g=b||"https://lbqnyv2.migugu.com/bianzu18.png",w=e.userInfo,y=w.nickName,C=w.avatarUrl,"0rpx",$={css:{width:"710rpx",height:"1278rpx"},views:[{type:"image",src:g,css:{width:"710rpx",height:"1138rpx",objectFit:"cover",top:"0rpx",left:"0rpx",position:"absolute"}},{type:"view",css:{background:"#fff",width:"710rpx",height:"140rpx",bottom:"0rpx",left:"0rpx",position:"absolute"},views:[{type:"image",src:C,css:{position:"absolute",width:"94rpx",height:"94rpx",objectFit:"cover",borderRadius:"50rpx",bottom:"23rpx",left:"20rpx"}},{type:"text",text:y,css:{position:"absolute",bottom:"70rpx",left:"130rpx",width:"350rpx",fontSize:"32rpx",fontWeight:"300",color:"#0C0C0C"}},{type:"text",text:"邀请您成为"+e.$t("action.attendantName")+" 快快扫码加盟我们吧!",css:{position:"absolute",bottom:"25rpx",left:"130rpx",width:"750rpx",fontSize:"26rpx",color:"#999999"}}]},{type:"image",src:x,css:{position:"absolute",width:"290rpx",height:"290rpx",bottom:"366rpx",left:"210rpx",background:"#ffffff",borderRadius:"0rpx"}}]},e.$refs.painter.render($),e.$refs.painter.canvasToTempFilePathSync({fileType:"jpg",quality:1,success:function(t){r.$util.hideAll(),e.src=t.tempFilePath}});case 18:case"end":return n.stop()}}),n)})))()},previewImage:function(){var t=this.src;uni.previewImage({current:t,urls:[t]})},saveImage:function(){var t=this;return(0,s.default)((0,a.default)().mark((function e(){var n,i,o,s;return(0,a.default)().wrap((function(e){while(1)switch(e.prev=e.next){case 0:return e.next=2,t.$util.checkAuth({type:"writePhotosAlbum"});case 2:return n=t.src,e.next=5,uni.saveImageToPhotosAlbum({filePath:n});case 5:if(i=e.sent,o=(0,r.default)(i,2),s=o[0],o[1],!s){e.next=11;break}return e.abrupt("return");case 11:uni.showToast({icon:"none",title:"保存成功"});case 12:case"end":return e.stop()}}),e)})))()},toPreviewSave:function(){this.previewImage()}})};e.default=u}}]);