王总上门按摩后台代码
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.
 
 
 
 
 
shangmenanmo/public/h6/static/js/agent-pages-poster-salesman...

1 lines
5.0 KiB

(window["webpackJsonp"]=window["webpackJsonp"]||[]).push([["agent-pages-poster-salesman"],{"1acc":function(e,t,n){"use strict";n.d(t,"b",(function(){return i})),n.d(t,"c",(function(){return a})),n.d(t,"a",(function(){return r}));var r={lPainter:n("577c").default},i=function(){var e=this,t=e.$createElement,n=e._self._c||t;return n("v-uni-view",[n("v-uni-view",{staticClass:"hideCanvasView"},[n("l-painter",{ref:"painter",staticClass:"hideCanvas",attrs:{useCORS:!0}})],1),e.src?[n("v-uni-image",{staticClass:"code-img",attrs:{src:e.src},on:{click:function(t){arguments[0]=t=e.$handleEvent(t),e.previewImage.apply(void 0,arguments)}}}),n("v-uni-view",{staticClass:"space-max-footer"}),n("fix-bottom-button",{attrs:{text:[{text:e.confirmText,type:"confirm"}],bgColor:"#fff",classType:2},on:{confirm:function(t){arguments[0]=t=e.$handleEvent(t),e.toPreviewSave.apply(void 0,arguments)}}})]:e._e()],2)},a=[]},"1c60":function(e,t,n){"use strict";var r=n("9688"),i=n.n(r);i.a},"5d47":function(e,t,n){"use strict";n.r(t);var r=n("b9ce"),i=n.n(r);for(var a in r)["default"].indexOf(a)<0&&function(e){n.d(t,e,(function(){return r[e]}))}(a);t["default"]=i.a},6788:function(e,t,n){var r=n("c86c");t=r(!1),t.push([e.i,".code-img[data-v-7e637f3a]{width:%?750?%;height:%?1280?%}",""]),e.exports=t},9688:function(e,t,n){var r=n("6788");r.__esModule&&(r=r.default),"string"===typeof r&&(r=[[e.i,r,""]]),r.locals&&(e.exports=r.locals);var i=n("967d").default;i("60e2e4a8",r,!0,{sourceMap:!1,shadowMode:!1})},b9ce:function(e,t,n){"use strict";n("6a54");var r=n("f5bd").default;Object.defineProperty(t,"__esModule",{value:!0}),t.default=void 0;var i=r(n("5de6")),a=r(n("9b1b")),o=r(n("2634")),s=r(n("2fdc")),c=n("8f59"),u={components:{},props:{},data:function(){return{confirmText:"长按上图保存图片",src:""}},computed:(0,c.mapState)({primaryColor:function(e){return e.config.configInfo.primaryColor},configInfo:function(e){return e.config.configInfo},userInfo:function(e){return e.user.userInfo}}),onLoad:function(e){var t=this;return(0,s.default)((0,o.default)().mark((function e(){var n;return(0,o.default)().wrap((function(e){while(1)switch(e.prev=e.next){case 0:if(!t.$jweixin.isWechat()){e.next=4;break}return e.next=3,t.$jweixin.initJssdk();case 3:t.$jweixin.wxReady((function(){t.$jweixin.hideOptionMenu()}));case 4:return t.$util.showLoading(),e.next=7,t.getConfigInfo();case 7:t.$util.setNavigationBarColor({bg:t.primaryColor}),n=t,setTimeout((function(){n.renderToCanvas()}),1e3);case 10:case"end":return e.stop()}}),e)})))()},methods:(0,a.default)((0,a.default)({},(0,c.mapActions)(["getConfigInfo"])),{},{renderToCanvas:function(){var e=this;return(0,s.default)((0,o.default)().mark((function t(){var n,r,i,a,s,c,u,f,p;return(0,o.default)().wrap((function(t){while(1)switch(t.prev=t.next){case 0:return n=e,t.next=3,e.$api.agent.agentInviteQr({type:2});case 3:r=t.sent,i=e.configInfo.salesman_poster,a=void 0===i?"":i,s=a||"https://lbqny.migugu.com/admin/anmo/mine/salesman-share.png",c=e.userInfo,u=c.nickName,f=c.avatarUrl,"0rpx",p={css:{width:"750rpx",height:"1280rpx"},views:[{type:"image",src:s,css:{width:"750rpx",height:"1140rpx",objectFit:"cover",top:"0rpx",left:"0rpx",position:"absolute"}},{type:"view",css:{background:"#fff",width:"750rpx",height:"140rpx",bottom:"0rpx",left:"0rpx",position:"absolute"},views:[{type:"image",src:f,css:{position:"absolute",width:"94rpx",height:"94rpx",objectFit:"cover",borderRadius:"50rpx",bottom:"23rpx",left:"20rpx"}},{type:"text",text:u,css:{position:"absolute",bottom:"70rpx",left:"130rpx",width:"350rpx",fontSize:"32rpx",fontWeight:"400",color:"#000"}},{type:"text",text:"邀请您成为TA的业务员,扫描二维码立即加入吧!",css:{position:"absolute",bottom:"25rpx",left:"130rpx",width:"750rpx",fontSize:"26rpx",color:"#999999"}}]},{type:"image",src:r,css:{position:"absolute",width:"290rpx",height:"290rpx",bottom:"366rpx",left:"228rpx",background:"#ffffff",borderRadius:"0rpx"}}]},e.$refs.painter.render(p),e.$refs.painter.canvasToTempFilePathSync({fileType:"jpg",quality:1,success:function(t){n.$util.hideAll(),e.src=t.tempFilePath}});case 11:case"end":return t.stop()}}),t)})))()},previewImage:function(){var e=this.src;uni.previewImage({current:e,urls:[e]})},saveImage:function(){var e=this;return(0,s.default)((0,o.default)().mark((function t(){var n,r,a,s;return(0,o.default)().wrap((function(t){while(1)switch(t.prev=t.next){case 0:return t.next=2,e.$util.checkAuth({type:"writePhotosAlbum"});case 2:return n=e.src,t.next=5,uni.saveImageToPhotosAlbum({filePath:n});case 5:if(r=t.sent,a=(0,i.default)(r,2),s=a[0],a[1],!s){t.next=11;break}return t.abrupt("return");case 11:uni.showToast({icon:"none",title:"保存成功"});case 12:case"end":return t.stop()}}),t)})))()},toPreviewSave:function(){this.previewImage()}})};t.default=u},da71:function(e,t,n){"use strict";n.r(t);var r=n("1acc"),i=n("5d47");for(var a in i)["default"].indexOf(a)<0&&function(e){n.d(t,e,(function(){return i[e]}))}(a);n("1c60");var o=n("828b"),s=Object(o["a"])(i["default"],r["b"],r["c"],!1,null,"7e637f3a",null,!1,r["a"],void 0);t["default"]=s.exports}}]);