You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
1 line
5.5 KiB
1 line
5.5 KiB
5 months ago
|
(global["webpackJsonp"]=global["webpackJsonp"]||[]).push([["user/pages/distribution/bind-technician"],{"0cb9":function(t,e,n){"use strict";(function(t){var r=n("47a9");Object.defineProperty(e,"__esModule",{value:!0}),e.default=void 0;var i=r(n("7eb4")),o=r(n("34cf")),a=r(n("7ca3")),c=r(n("ee10")),u=n("8f59");function s(t,e){var n=Object.keys(t);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(t);e&&(r=r.filter((function(e){return Object.getOwnPropertyDescriptor(t,e).enumerable}))),n.push.apply(n,r)}return n}function f(t){for(var e=1;e<arguments.length;e++){var n=null!=arguments[e]?arguments[e]:{};e%2?s(Object(n),!0).forEach((function(e){(0,a.default)(t,e,n[e])})):Object.getOwnPropertyDescriptors?Object.defineProperties(t,Object.getOwnPropertyDescriptors(n)):s(Object(n)).forEach((function(e){Object.defineProperty(t,e,Object.getOwnPropertyDescriptor(n,e))}))}return t}var p={components:{},props:{},data:function(){return{options:{},confirmText:"保存图片至相册",src:"",admin_id:0,check_admin:{id:0,agent_name:"平台"}}},computed:(0,u.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(e){var n=this;return(0,c.default)(i.default.mark((function r(){var o,a;return i.default.wrap((function(r){while(1)switch(r.prev=r.next){case 0:return n.options=e,n.$util.showLoading(),r.next=4,n.getConfigInfo();case 4:n.$util.setNavigationBarColor({bg:n.primaryColor}),o="邀请绑定"+n.$t("action.attendantName"),t.setNavigationBarTitle({title:o}),a=n,setTimeout((function(){a.renderToCanvas()}),1e3);case 9:case"end":return r.stop()}}),r)})))()},methods:f(f({},(0,u.mapActions)(["getConfigInfo"])),{},{initRefresh:function(){this.src="",this.$util.showLoading(),this.renderToCanvas(!0)},renderToCanvas:function(){var t=arguments,e=this;return(0,c.default)(i.default.mark((function n(){var r,o,a,c,u,s,f,p,l,d,h,m,v,b,g,x,w,y,_,O;return i.default.wrap((function(n){while(1)switch(n.prev=n.next){case 0:return r=t.length>0&&void 0!==t[0]&&t[0],o=e,a=o.options.type,c=void 0===a?0:a,u=1==c?"resellerInvCoachQr":"adminCoachQr",s=o.admin_id,f=void 0===s?0:s,p=o.check_admin,l=void 0===p?{}:p,d=l.id,h=void 0===d?0:d,r&&1==c&&h&&(f=h),m=1==c?{admin_id:f}:{},n.next=10,e.$api.mine[u](m);case 10:v=n.sent,b=e.configInfo.bind_technician_img,g=void 0===b?"":b,x=g||"https://lbqnyv2.migugu.com/bianzu18.png",w=e.userInfo,y=w.nickName,_=w.avatarUrl,"0rpx","145rpx",O={css:{width:"710rpx",height:"1278rpx"},views:[{type:"image",src:x,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:_,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:v,css:{position:"absolute",width:"290rpx",height:"290rpx",bottom:"366rpx",left:"210rpx",background:"#ffffff",borderRadius:"145rpx"}}]},e.$refs.painter.render(O),e.$refs.painter.canvasToTempFilePathSync({fileType:"jpg",quality:1,success:function(t){o.$util.hideAll(),e.src=t.tempFilePath}});case 19:case"end":return n.stop()}}),n)})))()},previewImage:function(){var e=this.src;t.previewImage({current:e,urls:[e]})},saveImage:function(){var e=this;return(0,c.default)(i.default.mark((function n(){var r,a,c,u;return i.default.wrap((function(n){while(1)switch(n.prev=n.next){case 0:return n.next=2,e.$util.checkAuth({type:"writePhotosAlbum"});case 2:return r=e.src,n.next=5,t.saveImageToPhotosAlbum({filePath:r});case 5:if(a=n.sent,c=(0,o.def
|