Files
Smart-Farm/front/mine/pages/distribution/poster.js
2025-12-22 17:13:05 +08:00

1 line
5.0 KiB
JavaScript

(global["webpackJsonp"]=global["webpackJsonp"]||[]).push([["mine/pages/distribution/poster"],{"00a0":function(e,t,r){"use strict";r.r(t);var n=r("fece"),o=r("25b5");for(var i in o)["default"].indexOf(i)<0&&function(e){r.d(t,e,(function(){return o[e]}))}(i);r("9ae5");var a=r("f0c5"),c=Object(a["a"])(o["default"],n["b"],n["c"],!1,null,null,null,!1,n["a"],void 0);t["default"]=c.exports},"0e49":function(e,t,r){},"25b5":function(e,t,r){"use strict";r.r(t);var n=r("608e"),o=r.n(n);for(var i in n)["default"].indexOf(i)<0&&function(e){r.d(t,e,(function(){return n[e]}))}(i);t["default"]=o.a},"608e":function(e,t,r){"use strict";(function(e){var n=r("4ea4");Object.defineProperty(t,"__esModule",{value:!0}),t.default=void 0;var o=n(r("2eee")),i=n(r("278c")),a=n(r("9523")),c=n(r("c973")),s=r("26cb");n(r("09da"));function u(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?u(Object(r),!0).forEach((function(t){(0,a.default)(e,t,r[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):u(Object(r)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(r,t))}))}return e}var l={components:{},props:{},data:function(){return{src:"",options:"",poster:{}}},computed:(0,s.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:t.$util.setNavigationBarColor({color:"#000000",bg:"#ffffff"}),t.widget=t.$refs.canvas,t.$util.showLoading(),r=t,setTimeout((function(){r.canvase()}),1e3);case 5:case"end":return e.stop()}}),e)})))()},methods:f(f({},(0,s.mapActions)(["user/report"])),{},{canvase:function(){var e=this;return(0,c.default)(o.default.mark((function t(){var r,n,i,a,c,s,u;return o.default.wrap((function(t){while(1)switch(t.prev=t.next){case 0:return r=e,t.next=3,e.$api.mine.getAppDownloadQr();case 3:n=t.sent,"https://lbqny.migugu.com/admin/farm/share.png",i=e.primaryColor,a=e.$util.getPage(-1).detail,c=a.fx_code,s=a.avatarUrl,u={css:{width:"750rpx",height:"1156rpx"},views:[{type:"image",src:"https://lbqny.migugu.com/admin/farm/share.png",css:{width:"750rpx",height:"1156rpx",top:"0rpx",left:"0rpx",position:"absolute"}},{type:"image",src:s,css:{position:"absolute",baclground:"#fff",width:"82rpx",height:"82rpx",top:"407rpx",left:"333rpx",border:"1rpx solid #fff",borderRadius:"50%"}},{type:"text",text:"邀请码",css:{position:"absolute",width:"137rpx",height:"30rpx",top:"658rpx",left:"304rpx",textAlign:"center",fontSize:"26rpx",color:i}},{type:"text",text:c,css:{position:"absolute",width:"137rpx",height:"30rpx",top:"696rpx",left:"304rpx",textAlign:"center",fontSize:"26rpx",textWeight:"bold",color:i}},{type:"image",src:n,css:{position:"absolute",baclground:"#fff",width:"148rpx",height:"148rpx",top:"505rpx",left:"304rpx"}}]},e.$refs.painter.render(u),e.$refs.painter.canvasToTempFilePathSync({fileType:"jpg",quality:1,success:function(t){r.$util.hideAll(),e.src=t.tempFilePath,console.log(t.tempFilePath)}});case 10: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,a,c,s;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(a=r.sent,c=(0,i.default)(a,2),s=c[0],c[1],!s){r.next=11;break}return r.abrupt("return");case 11:e.showToast({icon:"none",title:"保存成功"});case 12:case"end":return r.stop()}}),r)})))()},toAppShare:function(){e.share({provider:"weixin",scene:"WXSceneSession",type:0,href:"",title:"用心分享邀粉丝",summary:"月入过万 收益多",imageUrl:this.src,success:function(e){console.log("success:"+JSON.stringify(e))},fail:function(e){console.log("fail:"+JSON.stringify(e))}})}})};t.default=l}).call(this,r("543d")["default"])},"9ae5":function(e,t,r){"use strict";var n=r("0e49"),o=r.n(n);o.a},cfd1:function(e,t,r){"use strict";(function(e,t){var n=r("4ea4");r("b03e");n(r("66fd"));var o=n(r("00a0"));e.__webpack_require_UNI_MP_PLUGIN__=r,t(o.default)}).call(this,r("bc2e")["default"],r("543d")["createPage"])},fece:function(e,t,r){"use strict";r.d(t,"b",(function(){return o})),r.d(t,"c",(function(){return i})),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,"ea66"))}},o=function(){var e=this.$createElement;this._self._c},i=[]}},[["cfd1","common/runtime","common/vendor"]]]);