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
15 KiB

{"version":3,"sources":["uni-app:///main.js","webpack:///C:/Users/Administrator/Desktop/上门按摩/uniapp/user/pages/channel/poster.vue?9ad6","webpack:///C:/Users/Administrator/Desktop/上门按摩/uniapp/user/pages/channel/poster.vue?3870","webpack:///C:/Users/Administrator/Desktop/上门按摩/uniapp/user/pages/channel/poster.vue?3336","webpack:///C:/Users/Administrator/Desktop/上门按摩/uniapp/user/pages/channel/poster.vue?aed9","uni-app:///user/pages/channel/poster.vue","webpack:///C:/Users/Administrator/Desktop/上门按摩/uniapp/user/pages/channel/poster.vue?9249","webpack:///C:/Users/Administrator/Desktop/上门按摩/uniapp/user/pages/channel/poster.vue?8227"],"names":["wx","__webpack_require_UNI_MP_PLUGIN__","__webpack_require__","createPage","Page","components","props","data","src","options","poster","computed","primaryColor","configInfo","userInfo","onLoad","bg","that","setTimeout","methods","canvase","qr_code","css","width","height","background","views","type","fileType","quality","success","console","previewImage","uni","current","urls","saveImage","filePath","err","icon","title"],"mappings":";;;;;;;;;;;;;AAAA;AAGA;AACA;AAHA;AACAA,EAAE,CAACC,iCAAiC,GAAGC,mBAAmB;AAG1DC,UAAU,CAACC,eAAI,CAAC,C;;;;;;;;;;;;;ACLhB;AAAA;AAAA;AAAA;AAAA;AAAA;AAAmH;AACnH;AAC0D;AACL;AACc;;;AAGnE;AAC6M;AAC7M,gBAAgB,iNAAU;AAC1B,EAAE,4EAAM;AACR,EAAE,iFAAM;AACR,EAAE,0FAAe;AACjB;AACA;AACA;AACA;AACA;AACA,EAAE,qFAAU;AACZ;AACA;;AAEA;AACe,gF;;;;;;;;;;;;ACvBf;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;;;;;;;;;;;;;ACAA;AAAA;AAAA;AAAA;AAAA;AAAA;AACA;AACA;AACA;AACA,aAAa,gUAEN;AACP,KAAK;AACL;AACA,CAAC;AACD;AAC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ACvHA;AAAA;AAAA;AAAA;AAAwgD,CAAgB,m6CAAG,EAAC,C;;;;;;;;;;;ACA5hD;AACA,OAAO,KAAU,EAAE,kBAKd","file":"user/pages/channel/poster.js","sourcesContent":["import 'uni-pages';\n// @ts-ignore\nwx.__webpack_require_UNI_MP_PLUGIN__ = __webpack_require__;\nimport Vue from 'vue'\nimport Page from './user/pages/channel/poster.vue'\ncreatePage(Page)","import { render, staticRenderFns, recyclableRender, components } from \"./poster.vue?vue&type=template&id=107e28ac&\"\nvar renderjs\nimport script from \"./poster.vue?vue&type=script&lang=js&\"\nexport * from \"./poster.vue?vue&type=script&lang=js&\"\nimport style0 from \"./poster.vue?vue&type=style&index=0&lang=scss&\"\n\n\n/* normalize component */\nimport normalizer from \"!../../../../../../Downloads/HBuilderX.3.99.2023122611/HBuilderX/plugins/uniapp-cli/node_modules/@dcloudio/vue-cli-plugin-uni/packages/vue-loader/lib/runtime/componentNormalizer.js\"\nvar component = normalizer(\n script,\n render,\n staticRenderFns,\n false,\n null,\n null,\n null,\n false,\n components,\n renderjs\n)\n\ncomponent.options.__file = \"user/pages/channel/poster.vue\"\nexport default component.exports","export * from \"-!../../../../../../Downloads/HBuilderX.3.99.2023122611/HBuilderX/plugins/uniapp-cli/node_modules/@dcloudio/vue-cli-plugin-uni/packages/vue-loader/lib/loaders/templateLoader.js??vue-loader-options!../../../../../../Downloads/HBuilderX.3.99.2023122611/HBuilderX/plugins/uniapp-cli/node_modules/@dcloudio/vue-cli-plugin-uni/packages/webpack-preprocess-loader/index.js??ref--17-0!../../../../../../Downloads/HBuilderX.3.99.2023122611/HBuilderX/plugins/uniapp-cli/node_modules/@dcloudio/webpack-uni-mp-loader/lib/template.js!../../../../../../Downloads/HBuilderX.3.99.2023122611/HBuilderX/plugins/uniapp-cli/node_modules/@dcloudio/vue-cli-plugin-uni/packages/webpack-uni-app-loader/page-meta.js!../../../../../../Downloads/HBuilderX.3.99.2023122611/HBuilderX/plugins/uniapp-cli/node_modules/@dcloudio/vue-cli-plugin-uni/packages/vue-loader/lib/index.js??vue-loader-options!../../../../../../Downloads/HBuilderX.3.99.2023122611/HBuilderX/plugins/uniapp-cli/node_modules/@dcloudio/webpack-uni-mp-loader/lib/style.js!./poster.vue?vue&type=template&id=107e28ac&\"","var components\ntry {\n components = {\n lPainter: function () {\n return import(\n /* webpackChunkName: \"uni_modules/lime-painter/components/l-painter/l-painter\" */ \"@/uni_modules/lime-painter/components/l-painter/l-painter.vue\"\n )\n },\n }\n} catch (e) {\n if (\n e.message.indexOf(\"Cannot find module\") !== -1 &&\n e.message.indexOf(\".vue\") !== -1\n ) {\n console.error(e.message)\n console.error(\"1. 排查组件名称拼写是否正确\")\n console.error(\n \"2. 排查组件是否符合 easycom 规范,文档:https://uniapp.dcloud.net.cn/collocation/pages?id=easycom\"\n )\n console.error(\n \"3. 若组件不符合 easycom 规范,需手动引入,并在 components 中注册该组件\"\n )\n } else {\n throw e\n }\n}\nvar render = function () {\n var _vm = this\n var _h = _vm.$createElement\n var _c = _vm._self._c || _h\n}\nvar recyclableRender = false\nvar staticRenderFns = []\nrender._withStripped = true\n\nexport { render, staticRenderFns, recyclableRender, components }","import mod from \"-!../../../../../../Downloads/HBuilderX.3.99.2023122611/HBuilderX/plugins/uniapp-cli/node_modules/babel-loader/lib/index.js!../../../../../../Downloads/HBuilderX.3.99.2023122611/HBuilderX/plugins/uniapp-cli/node_modules/@dcloudio/vue-cli-plugin-uni/packages/webpack-preprocess-loader/index.js??ref--13-1!../../../../../../Downloads/HBuilderX.3.99.2023122611/HBuilderX/plugins/uniapp-cli/node_modules/@dcloudio/webpack-uni-mp-loader/lib/script.js!../../../../../../Downloads/HBuilderX.3.99.2023122611/HBuilderX/plugins/uniapp-cli/node_modules/@dcloudio/vue-cli-plugin-uni/packages/vue-loader/lib/index.js??vue-loader-options!../../../../../../Downloads/HBuilderX.3.99.2023122611/HBuilderX/plugins/uniapp-cli/node_modules/@dcloudio/webpack-uni-mp-loader/lib/style.js!./poster.vue?vue&type=script&lang=js&\"; export default mod; export * from \"-!../../../../../../Downloads/HBuilderX.3.99.2023122611/HBuilderX/plugins/uniapp-cli/node_modules/babel-loader/lib/index.js!../../../../../../Downloads/HBuilderX.3.99.2023122611/HBuilderX/plugins/uniapp-cli/node_modules/@dcloudio/vue-cli-plugin-uni/packages/webpack-preprocess-loader/index.js??ref--13-1!../../../../../../Downloads/HBuilderX.3.99.2023122611/HBuilderX/plugins/uniapp-cli/node_modules/@dcloudio/webpack-uni-mp-loader/lib/script.js!../../../../../../Downloads/HBuilderX.3.99.2023122611/HBuilderX/plugins/uniapp-cli/node_modules/@dcloudio/vue-cli-plugin-uni/packages/vue-loader/lib/index.js??vue-loader-options!../../../../../../Downloads/HBuilderX.3.99.2023122611/HBuilderX/plugins/uniapp-cli/node_modules/@dcloudio/webpack-uni-mp-loader/lib/style.js!./poster.vue?vue&type=script&lang=js&\"","<template>\r\n\t<view style=\"padding:20rpx 0\">\r\n\t\t<view class=\"hideCanvasView\">\r\n\t\t\t<l-painter class=\"hideCanvas\" ref=\"painter\" useCORS />\r\n\t\t</view>\r\n\t\t<block v-if=\"src\">\r\n\t\t\t<image :src=\"src\" class=\"code-img\" @tap=\"previewImage\"></image>\r\n\t\t\t<view class=\"btns\">\r\n\t\t\t\t<!-- #ifdef H5 -->\r\n\t\t\t\t<button class=\"save-btn flex-center radius\" :style=\"{background:primaryColor}\"\r\n\t\t\t\t\t@tap=\"previewImage\">长按上图保存图片</button>\r\n\t\t\t\t<!-- #endif -->\r\n\t\t\t\t<!-- #ifndef H5 -->\r\n\t\t\t\t<button class=\"save-btn flex-center radius\" :style=\"{background:primaryColor}\"\r\n\t\t\t\t\t@tap=\"saveImage\">保存图片至相册</button>\r\n\t\t\t\t<!-- #endif -->\r\n\t\t\t</view>\r\n\t\t</block>\r\n\t</view>\r\n</template>\r\n\r\n<script>\r\n\timport {\r\n\t\tmapState,\r\n\t\tmapActions\r\n\t} from 'vuex';\r\n\texport default {\r\n\t\tcomponents: {},\r\n\t\tprops: {\r\n\r\n\t\t},\r\n\t\tdata() {\r\n\t\t\treturn {\r\n\t\t\t\tsrc: '',\r\n\t\t\t\toptions: '',\r\n\t\t\t\tposter: {}\r\n\t\t\t}\r\n\t\t},\r\n\t\tcomputed: mapState({\r\n\t\t\tprimaryColor: state => state.config.configInfo.primaryColor,\r\n\t\t\tconfigInfo: state => state.config.configInfo,\r\n\t\t\tuserInfo: state => state.user.userInfo,\r\n\t\t}),\r\n\t\tasync onLoad(options) {\r\n\t\t\t// #ifdef H5\r\n\t\t\tif (this.$jweixin.isWechat()) {\r\n\t\t\t\tawait this.$jweixin.initJssdk();\r\n\t\t\t\tthis.$jweixin.wxReady(() => {\r\n\t\t\t\t\tthis.$jweixin.hideOptionMenu()\r\n\t\t\t\t})\r\n\t\t\t}\r\n\t\t\t// #endif \r\n\t\t\tthis.$util.showLoading()\r\n\t\t\tawait this.getConfigInfo()\r\n\t\t\tthis.$util.setNavigationBarColor({\r\n\t\t\t\tbg: this.primaryColor\r\n\t\t\t})\r\n\t\t\tlet that = this\r\n\t\t\tsetTimeout(() => {\r\n\t\t\t\tthat.canvase()\r\n\t\t\t}, 1000)\r\n\t\t},\r\n\t\tmethods: {\r\n\t\t\t...mapActions(['getConfigInfo']),\r\n\t\t\tasync canvase() {\r\n\t\t\t\tlet that = this\r\n\t\t\t\tlet qr_code = await this.$api.channel.channelQr()\r\n\r\n\t\t\t\tlet poster = {\r\n\t\t\t\t\tcss: {\r\n\t\t\t\t\t\twidth: '750rpx',\r\n\t\t\t\t\t\theight: '750rpx',\r\n\t\t\t\t\t\tbackground: '#ffffff',\r\n\t\t\t\t\t},\r\n\t\t\t\t\tviews: [{\r\n\t\t\t\t\t\ttype: 'image',\r\n\t\t\t\t\t\tsrc: qr_code,\r\n\t\t\t\t\t\tcss: {\r\n\t\t\t\t\t\t\twidth: '750rpx',\r\n\t\t\t\t\t\t\theight: '750rpx'\r\n\t\t\t\t\t\t}\r\n\t\t\t\t\t}]\r\n\t\t\t\t}\r\n\t\t\t\t// 渲染\r\n\t\t\t\tthis.$refs.painter.render(poster);\r\n\t\t\t\t// 生成图片\r\n\t\t\t\tthis.$refs.painter.canvasToTempFilePathSync({\r\n\t\t\t\t\tfileType: \"jpg\",\r\n\t\t\t\t\tquality: 1,\r\n\t\t\t\t\tsuccess: (res) => {\r\n\t\t\t\t\t\tthat.$util.hideAll()\r\n\t\t\t\t\t\tthis.src = res.tempFilePath\r\n\t\t\t\t\t\tconsole.log(res.tempFilePath);\r\n\t\t\t\t\t},\r\n\t\t\t\t});\r\n\t\t\t},\r\n\t\t\tpreviewImage() {\r\n\t\t\t\tlet finalPath = this.src;\r\n\t\t\t\tuni.previewImage({\r\n\t\t\t\t\tcurrent: finalPath,\r\n\t\t\t\t\turls: [finalPath]\r\n\t\t\t\t})\r\n\t\t\t},\r\n\t\t\tasync saveImage() {\r\n\t\t\t\tawait this.$util.checkAuth({\r\n\t\t\t\t\ttype: \"writePhotosAlbum\"\r\n\t\t\t\t});\r\n\t\t\t\tlet filePath = this.src;\r\n\t\t\t\tlet [err, success] = await uni.saveImageToPhotosAlbum({\r\n\t\t\t\t\tfilePath\r\n\t\t\t\t})\r\n\t\t\t\tif (err) return;\r\n\t\t\t\tuni.showToast({\r\n\t\t\t\t\ticon: 'none',\r\n\t\t\t\t\ttitle: '保存成功'\r\n\t\t\t\t})\r\n\t\t\t}\r\n\t\t},\r\n\r\n\t}\r\n</script>\r\n\r\n<style lang=\"scss\">\r\n\tpage {\r\n\t\tbackground: #fff;\r\n\t}\r\n\r\n\t.code-img {\r\n\t\twidth: 500rpx;\r\n\t\theight: 500rpx;\r\n\t\tmargin: 50rpx auto;\r\n\t}\r\n\r\n\t.btns {\r\n\t\tdisplay: flex;\r\n\t\tjustify-content: center;\r\n\t\tpadding: 15rpx;\r\n\t\tbackground-color: #fff;\r\n\t\tmargin-top: 20rpx;\r\n\r\n\t\t.save-btn {\r\n\t\t\twidth: 690rpx;\r\n\t\t\theight: 80rpx;\r\n\t\t\tline-height: 80rpx;\r\n\t\t\tmargin: 0 auto;\r\n\t\t}\r\n\t}\r\n</style>","import mod from \"-!../../../../../../Downloads/HBuilderX.3.99.2023122611/HBuilderX/plugins/uniapp-cli/node_modules/mini-css-extract-plugin/dist/loader.js??ref--8-oneOf-1-0!../../../../../../Downloads/HBuilderX.3.99.2023122611/HBuilderX/plugins/uniapp-cli/node_modules/css-loader/dist/cjs.js??ref--8-oneOf-1-1!../../../../../../Downloads/HBuilderX.3.99.2023122611/HBuilderX/plugins/uniapp-cli/node_modules/@dcloudio/vue-cli-plugin-uni/packages/vue-loader/lib/loaders/stylePostLoader.js!../../../../../../Downloads/HBuilderX.3.99.2023122611/HBuilderX/plugins/uniapp-cli/node_modules/@dcloudio/vue-cli-plugin-uni/packages/webpack-preprocess-loader/index.js??ref--8-oneOf-1-2!../../../../../../Downloads/HBuilderX.3.99.2023122611/HBuilderX/plugins/uniapp-cli/node_modules/postcss-loader/src/index.js??ref--8-oneOf-1-3!../../../../../../Downloads/HBuilderX.3.99.2023122611/HBuilderX/plugins/uniapp-cli/node_modules/@dcloudio/vue-cli-plugin-uni/packages/sass-loader/dist/cjs.js??ref--8-oneOf-1-4!../../../../../../Downloads/HBuilderX.3.99.2023122611/HBuilderX/plugins/uniapp-cli/node_modules/@dcloudio/vue-cli-plugin-uni/packages/webpack-preprocess-loader/index.js??ref--8-oneOf-1-5!../../../../../../Downloads/HBuilderX.3.99.2023122611/HBuilderX/plugins/uniapp-cli/node_modules/@dcloudio/vue-cli-plugin-uni/packages/vue-loader/lib/index.js??vue-loader-options!../../../../../../Downloads/HBuilderX.3.99.2023122611/HBuilderX/plugins/uniapp-cli/node_modules/@dcloudio/webpack-uni-mp-loader/lib/style.js!./poster.vue?vue&type=style&index=0&lang=scss&\"; export default mod; export * from \"-!../../../../../../Downloads/HBuilderX.3.99.2023122611/HBuilderX/plugins/uniapp-cli/node_modules/mini-css-extract-plugin/dist/loader.js??ref--8-oneOf-1-0!../../../../../../Downloads/HBuilderX.3.99.2023122611/HBuilderX/plugins/uniapp-cli/node_modules/css-loader/dist/cjs.js??ref--8-oneOf-1-1!../../../../../../Downloads/HBuilderX.3.99.2023122611/HBuilderX/plugins/uniapp-cli/node_modules/@dcloudio/vue-cli-plugin-uni/packages/vue-loader/lib/loaders/stylePostLoader.js!../../../../../../Downloads/HBuilderX.3.99.2023122611/HBuilderX/plugins/uniapp-cli/node_modules/@dcloudio/vue-cli-plugin-uni/packages/webpack-preprocess-loader/index.js??ref--8-oneOf-1-2!../../../../../../Downloads/HBuilderX.3.99.2023122611/HBuilderX/plugins/uniapp-cli/node_modules/postcss-loader/src/index.js??ref--8-oneOf-1-3!../../../../../../Downloads/HBuilderX.3.99.2023122611/HBuilderX/plugins/uniapp-cli/node_modules/@dcloudio/vue-cli-plugin-uni/packages/sass-loader/dist/cjs.js??ref--8-oneOf-1-4!../../../../../../Downloads/HBuilderX.3.99.2023122611/HBuilderX/plugins/uniapp-cli/node_modules/@dcloudio/vue-cli-plugin-uni/packages/webpack-preprocess-loader/index.js??ref--8-oneOf-1-5!../../../../../../Downloads/HBuilderX.3.99.2023122611/HBuilderX/plugins/uniapp-cli/node_modules/@dcloudio/vue-cli-plugin-uni/packages/vue-loader/lib/index.js??vue-loader-options!../../../../../../Downloads/HBuilderX.3.99.2023122611/HBuilderX/plugins/uniapp-cli/node_modules/@dcloudio/webpack-uni-mp-loader/lib/style.js!./poster.vue?vue&type=style&index=0&lang=scss&\"","// extracted by mini-css-extract-plugin\n if(module.hot) {\n // 1725332666128\n var cssReload = require(\"C:/Users/Administrator/Downloads/HBuilderX.3.99.2023122611/HBuilderX/plugins/uniapp-cli/node_modules/mini-css-extract-plugin/dist/hmr/hotModuleReplacement.js\")(module.id, {\"hmr\":true,\"publicPath\":\"/\",\"locals\":false});\n module.hot.dispose(cssReload);\n module.hot.accept(undefined, cssReload);\n }\n "],"sourceRoot":""}