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.
xxdj1/unpackage/dist/build/h5/static/js/user-pages-channel-poster.1...

1 line
4.3 KiB

1 year ago
(window["webpackJsonp"]=window["webpackJsonp"]||[]).push([["user-pages-channel-poster"],{"2ede":function(e,t,n){"use strict";n("7a82");var a=n("4ea4").default;Object.defineProperty(t,"__esModule",{value:!0}),t.default=void 0;var r=a(n("3835")),i=a(n("5530")),f=a(n("c7eb")),o=a(n("1da1")),u=n("26cb"),s=(a(n("7ded")),{components:{},props:{},data:function(){return{src:"",options:"",poster:{}}},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,o.default)((0,f.default)().mark((function e(){var n;return(0,f.default)().wrap((function(e){while(1)switch(e.prev=e.next){case 0:t.widget=t.$refs.canvas,t.$util.showLoading(),t.$util.setNavigationBarColor({bg:t.primaryColor}),n=t,setTimeout((function(){console.log("bbbb"),n.canvase()}),1e3);case 5:case"end":return e.stop()}}),e)})))()},methods:(0,i.default)((0,i.default)({},(0,u.mapActions)(["user/report"])),{},{canvase:function(){var e=this;return(0,o.default)((0,f.default)().mark((function t(){var n,a,r;return(0,f.default)().wrap((function(t){while(1)switch(t.prev=t.next){case 0:return n=e,t.next=3,e.$api.channel.channelQr();case 3:a=t.sent,r={css:{width:"750rpx",height:"750rpx",background:"#ffffff"},views:[{type:"image",src:a,css:{width:"750rpx",height:"750rpx"}}]},e.$refs.painter.render(r),e.$refs.painter.canvasToTempFilePathSync({fileType:"jpg",quality:1,success:function(t){n.$util.hideAll(),e.src=t.tempFilePath,console.log(t.tempFilePath)}});case 7: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,o.default)((0,f.default)().mark((function t(){var n,a,i,o;return(0,f.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(a=t.sent,i=(0,r.default)(a,2),o=i[0],i[1],!o){t.next=11;break}return t.abrupt("return");case 11:uni.showToast({icon:"none",title:"保存成功"});case 12:case"end":return t.stop()}}),t)})))()}})});t.default=s},"5ba5":function(e,t,n){"use strict";n.d(t,"b",(function(){return r})),n.d(t,"c",(function(){return i})),n.d(t,"a",(function(){return a}));var a={lPainter:n("52fd").default},r=function(){var e=this,t=e.$createElement,n=e._self._c||t;return n("v-uni-view",{staticStyle:{padding:"20rpx 0"}},[n("v-uni-view",{staticClass:"hideCanvasView"},[n("l-painter",{ref:"painter",staticClass:"hideCanvas"})],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:"btns"},[n("v-uni-button",{staticClass:"save-btn flex-center radius",style:{background:e.primaryColor},on:{click:function(t){arguments[0]=t=e.$handleEvent(t),e.previewImage.apply(void 0,arguments)}}},[e._v("长按上图保存图片")])],1)]:e._e()],2)},i=[]},"5c7e":function(e,t,n){"use strict";var a=n("74fc"),r=n.n(a);r.a},"74fc":function(e,t,n){var a=n("ce3f");a.__esModule&&(a=a.default),"string"===typeof a&&(a=[[e.i,a,""]]),a.locals&&(e.exports=a.locals);var r=n("4f06").default;r("3c6235f7",a,!0,{sourceMap:!1,shadowMode:!1})},9253:function(e,t,n){"use strict";n.r(t);var a=n("5ba5"),r=n("f86f");for(var i in r)["default"].indexOf(i)<0&&function(e){n.d(t,e,(function(){return r[e]}))}(i);n("5c7e");var f=n("f0c5"),o=Object(f["a"])(r["default"],a["b"],a["c"],!1,null,"2ff5065f",null,!1,a["a"],void 0);t["default"]=o.exports},ce3f:function(e,t,n){var a=n("24fb");t=a(!1),t.push([e.i,"uni-page-body[data-v-2ff5065f]{background:#fff}body.?%PAGE?%[data-v-2ff5065f]{background:#fff}.code-img[data-v-2ff5065f]{width:%?500?%;height:%?500?%;margin:%?50?% auto}.btns[data-v-2ff5065f]{display:flex;justify-content:center;padding:%?15?%;background-color:#fff;margin-top:%?20?%}.save-btn[data-v-2ff5065f]{width:%?690?%;height:%?80?%;line-height:%?80?%;margin:0 auto}.hideCanva