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/18634/Desktop/项目/xxdj1/user/pages/distribution/poster.vue?348c","webpack:///C:/Users/18634/Desktop/项目/xxdj1/user/pages/distribution/poster.vue?0d2c","webpack:///C:/Users/18634/Desktop/项目/xxdj1/user/pages/distribution/poster.vue?d098","webpack:///C:/Users/18634/Desktop/项目/xxdj1/user/pages/distribution/poster.vue?535e","uni-app:///user/pages/distribution/poster.vue","webpack:///C:/Users/18634/Desktop/项目/xxdj1/user/pages/distribution/poster.vue?386c","webpack:///C:/Users/18634/Desktop/项目/xxdj1/user/pages/distribution/poster.vue?ed1b"],"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","console","methods","canvase","qr_code","cover","qr_radius","css","width","height","views","type","top","left","position","bottom","background","borderRadius","fileType","quality","success","previewImage","uni","current","urls","saveImage","filePath","err","icon","title"],"mappings":";;;;;;;;;;;;;AAAA;AAE2D;AAC3D;AACA;AAHA;AACAA,EAAE,CAACC,iCAAiC,GAAGC,mBAAmB;AAG1DC,UAAU,CAACC,eAAI,CAAC,C;;;;;;;;;;;;;ACLhB;AAAA;AAAA;AAAA;AAAA;AAAA;AAAmH;AACnH;AAC0D;AACL;AACa;;;AAGlE;AACqK;AACrK,gBAAgB,+KAAU;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,+TAEN;AACP,KAAK;AACL;AACA,CAAC;AACD;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,GAAG;AACH;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;;;;;;;;ACjCA;AAAA;AAAA;AAAA;AAAgmB,CAAgB,0nBAAG,EAAC,C;;;;;;;;;;;;;;;;;;;;;;;ACwCpnB;AAIA;AAAA;AAAA;AAAA,eACA;EACAC;EACAC,QAEA;EACAC;IACA;MACAC;MACAC;MACAC;IACA;EACA;EACAC;IACAC;MAAA;IAAA;IACAC;MAAA;IAAA;IACAC;MAAA;IAAA;EACA;EACAC;IAAA;IAAA;MAAA;MAAA;QAAA;UAAA;YAAA;cACA;cACA;cACA;gBACAC;cACA;cACAC;cACAC;gBACAC;gBACAF;cACA;YAAA;YAAA;cAAA;UAAA;QAAA;MAAA;IAAA;EACA;EACAG,yCACA;IACAC;MAAA;MAAA;QAAA;QAAA;UAAA;YAAA;cAAA;gBACAJ;gBAAA;gBAAA,OACA;cAAA;gBAAAK;gBACAC;gBAEAC;gBAEAA;gBAGAd;kBACAe;oBACAC;oBACAC;kBACA;kBACAC;oBACAC;oBACArB;oBACAiB;sBACAC;sBACAC;sBACAG;sBACAC;sBACAC;oBACA;kBACA,GACA;oBACAH;oBACArB;oBACAiB;sBACAO;sBACAN;sBACAC;sBACAM;sBACAF;sBACAG;sBACAC;oBACA;kBACA;gBAEA,GACA;gBACA;gBACA;gBACA;kBACAC;kBACAC;kBACAC;oBACArB;oBACA;oBACAE;kBACA;gBACA;cAAA;cAAA;gBAAA;YAAA;UAAA;QAAA;MAAA;IACA;IACAoB;MACA;MACAC;QACAC;QACAC;MACA;IACA;IACAC;MAAA;MAAA;QAAA;QAAA;UAAA;YAAA;cAAA;gBAAA;gBAAA,OACA;kBACAd;gBACA;cAAA;gBACAe;gBAAA;gBAAA,OACAJ;kBACAI;gBACA;cAAA;gBAAA;gBAAA;gBAFAC;gBAAAP;gBAAA,KAGAO;kBAAA;kBAAA;gBAAA;gBAAA;cAAA;gBACAL;kBACAM;kBACAC;gBACA;cAAA;cAAA;gBAAA;YAAA;UAAA;QAAA;MAAA;IACA;EAAA;AAGA;AAAA,2B;;;;;;;;;;;;;ACzJA;AAAA;AAAA;AAAA;AAAk3B,CAAgB,m3BAAG,EAAC,C;;;;;;;;;;;ACAt4B;AACA,OAAO,KAAU,EAAE,kBAKd","file":"user/pages/distribution/poster.js","sourcesContent":["import 'uni-pages';\n// @ts-ignore\nwx.__webpack_require_UNI_MP_PLUGIN__ = __webpack_require__;import '@dcloudio/uni-stat/dist/uni-stat.es.js';\nimport Vue from 'vue'\nimport Page from './user/pages/distribution/poster.vue'\ncreatePage(Page)","import { render, staticRenderFns, recyclableRender, components } from \"./poster.vue?vue&type=template&id=190e6fb7&\"\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=css&\"\n\n\n/* normalize component */\nimport normalizer from \"!D:\\\\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/distribution/poster.vue\"\nexport default component.exports","export * from \"-!D:\\\\HBuilderX\\\\plugins\\\\uniapp-cli\\\\node_modules\\\\@dcloudio\\\\vue-cli-plugin-uni\\\\packages\\\\vue-loader\\\\lib\\\\loaders\\\\templateLoader.js??vue-loader-options!D:\\\\HBuilderX\\\\plugins\\\\uniapp-cli\\\\node_modules\\\\@dcloudio\\\\vue-cli-plugin-uni\\\\packages\\\\webpack-preprocess-loader\\\\index.js??ref--17-0!D:\\\\HBuilderX\\\\plugins\\\\uniapp-cli\\\\node_modules\\\\@dcloudio\\\\webpack-uni-mp-loader\\\\lib\\\\template.js!D:\\\\HBuilderX\\\\plugins\\\\uniapp-cli\\\\node_modules\\\\@dcloudio\\\\vue-cli-plugin-uni\\\\packages\\\\webpack-uni-app-loader\\\\page-meta.js!D:\\\\HBuilderX\\\\plugins\\\\uniapp-cli\\\\node_modules\\\\@dcloudio\\\\vue-cli-plugin-uni\\\\packages\\\\vue-loader\\\\lib\\\\index.js??vue-loader-options!D:\\\\HBuilderX\\\\plugins\\\\uniapp-cli\\\\node_modules\\\\@dcloudio\\\\webpack-uni-mp-loader\\\\lib\\\\style.js!./poster.vue?vue&type=template&id=190e6fb7&\"","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 \"-!D:\\\\HBuilderX\\\\plugins\\\\uniapp-cli\\\\node_modules\\\\babel-loader\\\\lib\\\\index.js!D:\\\\HBuilderX\\\\plugins\\\\uniapp-cli\\\\node_modules\\\\@dcloudio\\\\vue-cli-plugin-uni\\\\packages\\\\webpack-preprocess-loader\\\\index.js??ref--13-1!D:\\\\HBuilderX\\\\plugins\\\\uniapp-cli\\\\node_modules\\\\@dcloudio\\\\webpack-uni-mp-loader\\\\lib\\\\script.js!D:\\\\HBuilderX\\\\plugins\\\\uniapp-cli\\\\node_modules\\\\@dcloudio\\\\vue-cli-plugin-uni\\\\packages\\\\vue-loader\\\\lib\\\\index.js??vue-loader-options!D:\\\\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 \"-!D:\\\\HBuilderX\\\\plugins\\\\uniapp-cli\\\\node_modules\\\\babel-loader\\\\lib\\\\index.js!D:\\\\HBuilderX\\\\plugins\\\\uniapp-cli\\\\node_modules\\\\@dcloudio\\\\vue-cli-plugin-uni\\\\packages\\\\webpack-preprocess-loader\\\\index.js??ref--13-1!D:\\\\HBuilderX\\\\plugins\\\\uniapp-cli\\\\node_modules\\\\@dcloudio\\\\webpack-uni-mp-loader\\\\lib\\\\script.js!D:\\\\HBuilderX\\\\plugins\\\\uniapp-cli\\\\node_modules\\\\@dcloudio\\\\vue-cli-plugin-uni\\\\packages\\\\vue-loader\\\\lib\\\\index.js??vue-loader-options!D:\\\\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=\"background-color: #F4F6F7;padding:20rpx 0\">\r\n\t\t<view class=\"hideCanvasView\">\r\n\t\t\t<l-painter class=\"hideCanvas\" ref=\"painter\" />\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=\"info_text f_c\">\r\n\t\t\t\t<view class=\"\" style=\"font-size: 28rpx;margin-bottom:20rpx;color:#2F2F2F\">\r\n\t\t\t\t\t邀请3步\r\n\t\t\t\t</view>\r\n\t\t\t\t<view class=\"f_r_sb_c\" style=\"font-size: 28rpx;color:#767676\">\r\n\t\t\t\t\t<view class=\"f_r_m_c\">\r\n\t\t\t\t\t\t1.分享海报\r\n\t\t\t\t\t</view>\r\n\t\t\t\t\t<image class=\"info_text_img\" src=\"/static/coupon/btn.png\" mode=\"\"></image>\r\n\t\t\t\t\t<view class=\"f_r_m_c\">\r\n\t\t\t\t\t\t2.微信扫码\r\n\t\t\t\t\t</view>\r\n\t\t\t\t\t<image class=\"info_text_img\" src=\"/static/coupon/btn.png\" mode=\"\"></image>\r\n\t\t\t\t\t<view class=\"f_r_m_c\">\r\n\t\t\t\t\t\t3.注册登录\r\n\t\t\t\t\t</view>\r\n\t\t\t\t</view>\r\n\t\t\t</view>\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\timport siteInfo from '@/siteinfo.js';\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\tthis.widget = this.$refs.canvas\r\n\t\t\tthis.$util.showLoading()\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\tconsole.log('bbbb')\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(['user/report']),\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.mine.userCommQr()\r\n\t\t\t\tlet cover = 'https://lbqnyv2.migugu.com/bianzu14.png'\r\n\r\n\t\t\t\tlet qr_radius = '0rpx'\r\n\t\t\t\t// #ifdef MP-WEIXIN\r\n\t\t\t\tqr_radius = '145rpx'\r\n\t\t\t\t// #endif\r\n\r\n\t\t\t\tlet poster = {\r\n\t\t\t\t\tcss: {\r\n\t\t\t\t\t\twidth: '710rpx',\r\n\t\t\t\t\t\theight: '1138rpx',\r\n\t\t\t\t\t},\r\n\t\t\t\t\tviews: [{\r\n\t\t\t\t\t\t\ttype: 'image',\r\n\t\t\t\t\t\t\tsrc: cover,\r\n\t\t\t\t\t\t\tcss: {\r\n\t\t\t\t\t\t\t\twidth: '710rpx',\r\n\t\t\t\t\t\t\t\theight: '1138rpx',\r\n\t\t\t\t\t\t\t\ttop: '0rpx',\r\n\t\t\t\t\t\t\t\tleft: '0rpx',\r\n\t\t\t\t\t\t\t\tposition: 'absolute'\r\n\t\t\t\t\t\t\t}\r\n\t\t\t\t\t\t},\r\n\t\t\t\t\t\t{\r\n\t\t\t\t\t\t\ttype: 'image',\r\n\t\t\t\t\t\t\tsrc: qr_code,\r\n\t\t\t\t\t\t\tcss: {\r\n\t\t\t\t\t\t\t\tposition: 'absolute',\r\n\t\t\t\t\t\t\t\twidth: '290rpx',\r\n\t\t\t\t\t\t\t\theight: '290rpx',\r\n\t\t\t\t\t\t\t\tbottom: '70rpx',\r\n\t\t\t\t\t\t\t\tleft: '210rpx',\r\n\t\t\t\t\t\t\t\tbackground: '#ffffff',\r\n\t\t\t\t\t\t\t\tborderRadius: qr_radius\r\n\t\t\t\t\t\t\t}\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>\r\n\t.info_text {\r\n\t\twidth: 710rpx;\r\n\t\tmargin-left: 20rpx;\r\n\t\tbackground-color: #fff;\r\n\t\tpadding: 20rpx 40rpx;\r\n\t\tbox-sizing: border-box;\r\n\t}\r\n\r\n\t.info_text_img {\r\n\t\twidth: 20rpx;\r\n\t\theight: 20rpx;\r\n\t}\r\n\r\n\t.code-img {\r\n\t\twidth: 710rpx;\r\n\t\theight: 1138rpx;\r\n\t\tmargin-left: 20rpx;\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\t}\r\n\r\n\t.save-btn {\r\n\t\twidth: 690rpx;\r\n\t\theight: 80rpx;\r\n\t\tline-height: 80rpx;\r\n\t\tmargin: 0 auto;\r\n\t}\r\n\r\n\t.hideCanvasView {\r\n\t\tposition: relative;\r\n\t}\r\n\r\n\t.hideCanvas {\r\n\t\tposition: absolute;\r\n\t\tleft: -9999rpx;\r\n\t\ttop: -9999rpx\r\n\t}\r\n</style>\r\n","import mod from \"-!D:\\\\HBuilderX\\\\plugins\\\\uniapp-cli\\\\node_modules\\\\mini-css-extract-plugin\\\\dist\\\\loader.js??ref--6-oneOf-1-0!D:\\\\HBuilderX\\\\plugins\\\\uniapp-cli\\\\node_modules\\\\css-loader\\\\dist\\\\cjs.js??ref--6-oneOf-1-1!D:\\\\HBuilderX\\\\plugins\\\\uniapp-cli\\\\node_modules\\\\@dcloudio\\\\vue-cli-plugin-uni\\\\packages\\\\vue-loader\\\\lib\\\\loaders\\\\stylePostLoader.js!D:\\\\HBuilderX\\\\plugins\\\\uniapp-cli\\\\node_modules\\\\@dcloudio\\\\vue-cli-plugin-uni\\\\packages\\\\webpack-preprocess-loader\\\\index.js??ref--6-oneOf-1-2!D:\\\\HBuilderX\\\\plugins\\\\uniapp-cli\\\\node_modules\\\\postcss-loader\\\\src\\\\index.js??ref--6-oneOf-1-3!D:\\\\HBuilderX\\\\plugins\\\\uniapp-cli\\\\node_modules\\\\@dcloudio\\\\vue-cli-plugin-uni\\\\packages\\\\vue-loader\\\\lib\\\\index.js??vue-loader-options!D:\\\\HBuilderX\\\\plugins\\\\uniapp-cli\\\\node_modules\\\\@dcloudio\\\\webpack-uni-mp-loader\\\\lib\\\\style.js!./poster.vue?vue&type=style&index=0&lang=css&\"; export default mod; export * from \"-!D:\\\\HBuilderX\\\\plugins\\\\uniapp-cli\\\\node_modules\\\\mini-css-extract-plugin\\\\dist\\\\loader.js??ref--6-oneOf-1-0!D:\\\\HBuilderX\\\\plugins\\\\uniapp-cli\\\\node_modules\\\\css-loader\\\\dist\\\\cjs.js??ref--6-oneOf-1-1!D:\\\\HBuilderX\\\\plugins\\\\uniapp-cli\\\\node_modules\\\\@dcloudio\\\\vue-cli-plugin-uni\\\\packages\\\\vue-loader\\\\lib\\\\loaders\\\\stylePostLoader.js!D:\\\\HBuilderX\\\\plugins\\\\uniapp-cli\\\\node_modules\\\\@dcloudio\\\\vue-cli-plugin-uni\\\\packages\\\\webpack-preprocess-loader\\\\index.js??ref--6-oneOf-1-2!D:\\\\HBuilderX\\\\plugins\\\\uniapp-cli\\\\node_modules\\\\postcss-loader\\\\src\\\\index.js??ref--6-oneOf-1-3!D:\\\\HBuilderX\\\\plugins\\\\uniapp-cli\\\\node_modules\\\\@dcloudio\\\\vue-cli-plugin-uni\\\\packages\\\\vue-loader\\\\lib\\\\index.js??vue-loader-options!D:\\\\HBuilderX\\\\plugins\\\\uniapp-cli\\\\node_modules\\\\@dcloudio\\\\webpack-uni-mp-loader\\\\lib\\\\style.js!./poster.vue?vue&type=style&index=0&lang=css&\"","// extracted by mini-css-extract-plugin\n if(module.hot) {\n // 1693382494776\n var cssReload = require(\"D:/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":""}