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.2 KiB

(global["webpackJsonp"]=global["webpackJsonp"]||[]).push([["user/pages/distribution/poster"],{"14eb":function(e,t,n){"use strict";(function(e,t){var r=n("47a9");n("7043");r(n("3240"));var o=r(n("e656"));e.__webpack_require_UNI_MP_PLUGIN__=n,t(o.default)}).call(this,n("3223")["default"],n("df3c")["createPage"])},"1e83":function(e,t,n){"use strict";(function(e){var r=n("47a9");Object.defineProperty(t,"__esModule",{value:!0}),t.default=void 0;var o=r(n("7eb4")),i=r(n("34cf")),a=r(n("7ca3")),c=r(n("ee10")),u=n("8f59");function s(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),n.push.apply(n,r)}return n}function f(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?s(Object(n),!0).forEach((function(t){(0,a.default)(e,t,n[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):s(Object(n)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))}))}return e}var l={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 n;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}),n=t,setTimeout((function(){n.canvase()}),1e3);case 6:case"end":return e.stop()}}),e)})))()},methods:f(f({},(0,u.mapActions)(["getConfigInfo"])),{},{canvase:function(){var e=this;return(0,c.default)(o.default.mark((function t(){var n,r,i,a,c,u;return o.default.wrap((function(t){while(1)switch(t.prev=t.next){case 0:return n=e,t.next=3,e.$api.mine.userCommQr();case 3:r=t.sent,i=e.configInfo.promotion_poster_img,a=void 0===i?"":i,c=a||"https://lbqny.migugu.com/admin/anmo/mine/fx-share.png","0rpx","145rpx",u={css:{width:"710rpx",height:"1152rpx"},views:[{type:"image",src:c,css:{width:"710rpx",height:"1152rpx",objectFit:"cover",top:"0rpx",left:"0rpx",position:"absolute"}},{type:"image",src:r,css:{position:"absolute",width:"290rpx",height:"290rpx",bottom:"70rpx",left:"210rpx",background:"#ffffff",borderRadius:"145rpx"}}]},e.$refs.painter.render(u),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 t=this.src;e.previewImage({current:t,urls:[t]})},saveImage:function(){var t=this;return(0,c.default)(o.default.mark((function n(){var r,a,c,u;return o.default.wrap((function(n){while(1)switch(n.prev=n.next){case 0:return n.next=2,t.$util.checkAuth({type:"writePhotosAlbum"});case 2:return r=t.src,n.next=5,e.saveImageToPhotosAlbum({filePath:r});case 5:if(a=n.sent,c=(0,i.default)(a,2),u=c[0],c[1],!u){n.next=11;break}return n.abrupt("return");case 11:e.showToast({icon:"none",title:"保存成功"});case 12:case"end":return n.stop()}}),n)})))()},toPreviewSave:function(){this.saveImage()}})};t.default=l}).call(this,n("df3c")["default"])},4692:function(e,t,n){"use strict";n.r(t);var r=n("1e83"),o=n.n(r);for(var i in r)["default"].indexOf(i)<0&&function(e){n.d(t,e,(function(){return r[e]}))}(i);t["default"]=o.a},"65e1":function(e,t,n){"use strict";var r=n("dd5c"),o=n.n(r);o.a},dd5c:function(e,t,n){},e656:function(e,t,n){"use strict";n.r(t);var r=n("e833b"),o=n("4692");for(var i in o)["default"].indexOf(i)<0&&function(e){n.d(t,e,(function(){return o[e]}))}(i);n("65e1");var a=n("828b"),c=Object(a["a"])(o["default"],r["b"],r["c"],!1,null,null,null,!1,r["a"],void 0);t["default"]=c.exports},e833b:function(e,t,n){"use strict";n.d(t,"b",(function(){return o})),n.d(t,"c",(function(){return i})),n.d(t,"a",(function(){return r}));var r={lPainter:function(){return Promise.all([n.e("common/vendor"),n.e("uni_modules/lime-painter/components/l-painter/l-painter")]).then(n.bind(null,"577c"))}},o=function(){var e=this.$createElement;this._self._c},i=[]}},[["14eb","common/runtime","common/vendor"]]]);