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
3.9 KiB
1 lines
3.9 KiB
(global["webpackJsonp"]=global["webpackJsonp"]||[]).push([["user/pages/channel/poster"],{"00fa":function(e,t,n){"use strict";n.d(t,"b",(function(){return a})),n.d(t,"c",(function(){return o})),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"))}},a=function(){var e=this.$createElement;this._self._c},o=[]},1675:function(e,t,n){"use strict";(function(e){var r=n("47a9");Object.defineProperty(t,"__esModule",{value:!0}),t.default=void 0;var a=r(n("7eb4")),o=r(n("34cf")),c=r(n("7ca3")),i=r(n("ee10")),u=n("8f59");function f(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 s(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?f(Object(n),!0).forEach((function(t){(0,c.default)(e,t,n[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):f(Object(n)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))}))}return e}var l={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,i.default)(a.default.mark((function e(){var n;return a.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:s(s({},(0,u.mapActions)(["getConfigInfo"])),{},{canvase:function(){var e=this;return(0,i.default)(a.default.mark((function t(){var n,r,o;return a.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:r=t.sent,o={css:{width:"750rpx",height:"750rpx",background:"#ffffff"},views:[{type:"image",src:r,css:{width:"750rpx",height:"750rpx"}}]},e.$refs.painter.render(o),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 t=this.src;e.previewImage({current:t,urls:[t]})},saveImage:function(){var t=this;return(0,i.default)(a.default.mark((function n(){var r,c,i,u;return a.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(c=n.sent,i=(0,o.default)(c,2),u=i[0],i[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)})))()}})};t.default=l}).call(this,n("df3c")["default"])},"324b":function(e,t,n){"use strict";var r=n("aa85"),a=n.n(r);a.a},"493c":function(e,t,n){"use strict";n.r(t);var r=n("00fa"),a=n("ff99");for(var o in a)["default"].indexOf(o)<0&&function(e){n.d(t,e,(function(){return a[e]}))}(o);n("324b");var c=n("828b"),i=Object(c["a"])(a["default"],r["b"],r["c"],!1,null,null,null,!1,r["a"],void 0);t["default"]=i.exports},"7f2b":function(e,t,n){"use strict";(function(e,t){var r=n("47a9");n("7043");r(n("3240"));var a=r(n("493c"));e.__webpack_require_UNI_MP_PLUGIN__=n,t(a.default)}).call(this,n("3223")["default"],n("df3c")["createPage"])},aa85:function(e,t,n){},ff99:function(e,t,n){"use strict";n.r(t);var r=n("1675"),a=n.n(r);for(var o in r)["default"].indexOf(o)<0&&function(e){n.d(t,e,(function(){return r[e]}))}(o);t["default"]=a.a}},[["7f2b","common/runtime","common/vendor"]]]); |