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 lines
4.9 KiB

(global["webpackJsonp"]=global["webpackJsonp"]||[]).push([["agent/pages/poster/salesman"],{"0ad2":function(e,t,r){"use strict";(function(e){var n=r("47a9");Object.defineProperty(t,"__esModule",{value:!0}),t.default=void 0;var o=n(r("7eb4")),a=n(r("34cf")),i=n(r("7ca3")),c=n(r("ee10")),u=r("8f59");function s(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),r.push.apply(r,n)}return r}function f(e){for(var t=1;t<arguments.length;t++){var r=null!=arguments[t]?arguments[t]:{};t%2?s(Object(r),!0).forEach((function(t){(0,i.default)(e,t,r[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):s(Object(r)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(r,t))}))}return e}var p={components:{},props:{},data:function(){return{confirmText:"保存图片至相册",src:""}},computed:(0,u.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,c.default)(o.default.mark((function e(){var r;return o.default.wrap((function(e){while(1)switch(e.prev=e.next){case 0:return t.$util.showLoading(),e.next=3,t.getConfigInfo();case 3:t.$util.setNavigationBarColor({bg:t.primaryColor}),r=t,setTimeout((function(){r.renderToCanvas()}),1e3);case 6:case"end":return e.stop()}}),e)})))()},methods:f(f({},(0,u.mapActions)(["getConfigInfo"])),{},{renderToCanvas:function(){var e=this;return(0,c.default)(o.default.mark((function t(){var r,n,a,i,c,u,s,f,p;return o.default.wrap((function(t){while(1)switch(t.prev=t.next){case 0:return r=e,t.next=3,e.$api.agent.agentInviteQr({type:2});case 3:n=t.sent,a=e.configInfo.salesman_poster,i=void 0===a?"":a,c=i||"https://lbqny.migugu.com/admin/anmo/mine/salesman-share.png",u=e.userInfo,s=u.nickName,f=u.avatarUrl,"0rpx","145rpx",p={css:{width:"750rpx",height:"1280rpx"},views:[{type:"image",src:c,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:s,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:n,css:{position:"absolute",width:"290rpx",height:"290rpx",bottom:"366rpx",left:"228rpx",background:"#ffffff",borderRadius:"145rpx"}}]},e.$refs.painter.render(p),e.$refs.painter.canvasToTempFilePathSync({fileType:"jpg",quality:1,success:function(t){r.$util.hideAll(),e.src=t.tempFilePath}});case 12:case"end":return t.stop()}}),t)})))()},previewImage:function(){var t=this.src;e.previewImage({current:t,urls:[t]})},saveImage:function(){var t=this;return(0,c.default)(o.default.mark((function r(){var n,i,c,u;return o.default.wrap((function(r){while(1)switch(r.prev=r.next){case 0:return r.next=2,t.$util.checkAuth({type:"writePhotosAlbum"});case 2:return n=t.src,r.next=5,e.saveImageToPhotosAlbum({filePath:n});case 5:if(i=r.sent,c=(0,a.default)(i,2),u=c[0],c[1],!u){r.next=11;break}return r.abrupt("return");case 11:e.showToast({icon:"none",title:"保存成功"});case 12:case"end":return r.stop()}}),r)})))()},toPreviewSave:function(){this.saveImage()}})};t.default=p}).call(this,r("df3c")["default"])},"0ae8":function(e,t,r){"use strict";var n=r("92a7"),o=r.n(n);o.a},"5d47":function(e,t,r){"use strict";r.r(t);var n=r("0ad2"),o=r.n(n);for(var a in n)["default"].indexOf(a)<0&&function(e){r.d(t,e,(function(){return n[e]}))}(a);t["default"]=o.a},"92a7":function(e,t,r){},a8ef:function(e,t,r){"use strict";(function(e,t){var n=r("47a9");r("7043");n(r("3240"));var o=n(r("da71"));e.__webpack_require_UNI_MP_PLUGIN__=r,t(o.default)}).call(this,r("3223")["default"],r("df3c")["createPage"])},d3c4:function(e,t,r){"use strict";r.d(t,"b",(function(){return o})),r.d(t,"c",(function(){return a})),r.d(t,"a",(function(){return n}));var n={lPainter:function(){return Promise.all([r.e("common/vendor"),r.e("uni_modules/lime-painter/components/l-painter/l-painter")]).then(r.bind(null,"577c"))}},o=function(){var e=this.$createElement;this._self._c},a=[]},da71:function(e,t,r){"use strict";r.r(t);var n=r("d3c4"),o=r("5d47");for(var a in o)["default"].indexOf(a)<0&&function(e){r.d(t,e,(function(){return o[e]}))}(a);r("0ae8");var i=r("828b"),c=Object(i["a"])(o["default"],n["b"],n["c"],!1,null,null,null,!1,n["a"],void 0);t["default"]=c.exports}},[["a8ef","common/runtime","common/vendor"]]]);