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
16 KiB
1 lines
16 KiB
{"version":3,"sources":["webpack:///F:/zhaoshang/zhaoshangMiniApp_uni/components/StorePoster.vue?bffc","webpack:///F:/zhaoshang/zhaoshangMiniApp_uni/components/StorePoster.vue?2063","webpack:///F:/zhaoshang/zhaoshangMiniApp_uni/components/StorePoster.vue?0e63","webpack:///F:/zhaoshang/zhaoshangMiniApp_uni/components/StorePoster.vue?b9de","uni-app:///components/StorePoster.vue","webpack:///F:/zhaoshang/zhaoshangMiniApp_uni/components/StorePoster.vue?e00a","webpack:///F:/zhaoshang/zhaoshangMiniApp_uni/components/StorePoster.vue?4898"],"names":[],"mappings":";;;;;;;;;;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAoI;AACpI;AAC+D;AACL;AACsC;;;AAGhG;AAC+M;AAC/M,gBAAgB,uNAAU;AAC1B,EAAE,iFAAM;AACR,EAAE,kGAAM;AACR,EAAE,2GAAe;AACjB;AACA;AACA;AACA;AACA;AACA,EAAE,sGAAU;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;AACA;AACA;AACA;AACA;;;;;;;;;;;;;;ACRA;AAAA;AAAA;AAAA;AAAuzB,CAAgB,u0BAAG,EAAC,C;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;ACyC30B;AACA,yD;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAFA;eAIA,EACA,mBADA,EAEA,SACA,0BADA,EAEA,kBAFA,EAGA,cAHA,EAFA,EAOA,uBACA,SACA,mBADA,EAEA,eAFA,GAIA,CAZA,EAaA,SACA,iDACA,gBACA,sCACA,4BACA,sBACA,CAFA,EAGA,CACA,CARA,EAbA,EAuBA,8BAvBA,EAwBA,WACA,+CACA,+BACA,0BACA,mCACA,CALA,EAMA,6BACA,oCACA,CARA,EASA,YATA,wBASA,GATA,EASA,CACA,mBACA,QADA,EAEA,0BACA;AAEA;AACA,uBADA;AAEA,2BAFA;;AAIA,SATA;AAUA;AACA;AACA;AACA,uBADA;AAEA,2BAFA;;AAIA,SAhBA;;AAkBA,KA5BA;AA6BA;AACA;;AAEA;AACA,sBADA;AAEA,kBAFA;;AAIA;AACA,4GADA;;AAGA,UAHA,CAGA;AACA;AACA;AACA,OANA;AAOA,aAPA,CAOA;AACA;AACA,OATA;AAUA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,KAlEA,EAxBA,E;;;;;;;;;;;;;AC5CA;AAAA;AAAA;AAAA;AAA+/C,CAAgB,u9CAAG,EAAC,C;;;;;;;;;;;ACAnhD;AACA,OAAO,KAAU,EAAE,kBAKd","file":"components/StorePoster.js","sourcesContent":["import { render, staticRenderFns, recyclableRender, components } from \"./StorePoster.vue?vue&type=template&id=0de5befa&scoped=true&\"\nvar renderjs\nimport script from \"./StorePoster.vue?vue&type=script&lang=js&\"\nexport * from \"./StorePoster.vue?vue&type=script&lang=js&\"\nimport style0 from \"./StorePoster.vue?vue&type=style&index=0&id=0de5befa&scoped=true&lang=less&\"\n\n\n/* normalize component */\nimport normalizer from \"!D:\\\\Program Files\\\\HBuilderX.3.1.13.20210514\\\\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 \"0de5befa\",\n null,\n false,\n components,\n renderjs\n)\n\ncomponent.options.__file = \"components/StorePoster.vue\"\nexport default component.exports","export * from \"-!D:\\\\Program Files\\\\HBuilderX.3.1.13.20210514\\\\HBuilderX\\\\plugins\\\\uniapp-cli\\\\node_modules\\\\@dcloudio\\\\vue-cli-plugin-uni\\\\packages\\\\vue-loader\\\\lib\\\\loaders\\\\templateLoader.js??vue-loader-options!D:\\\\Program Files\\\\HBuilderX.3.1.13.20210514\\\\HBuilderX\\\\plugins\\\\uniapp-cli\\\\node_modules\\\\@dcloudio\\\\vue-cli-plugin-uni\\\\packages\\\\webpack-preprocess-loader\\\\index.js??ref--16-0!D:\\\\Program Files\\\\HBuilderX.3.1.13.20210514\\\\HBuilderX\\\\plugins\\\\uniapp-cli\\\\node_modules\\\\@dcloudio\\\\webpack-uni-mp-loader\\\\lib\\\\template.js!D:\\\\Program Files\\\\HBuilderX.3.1.13.20210514\\\\HBuilderX\\\\plugins\\\\uniapp-cli\\\\node_modules\\\\@dcloudio\\\\vue-cli-plugin-uni\\\\packages\\\\webpack-uni-app-loader\\\\page-meta.js!D:\\\\Program Files\\\\HBuilderX.3.1.13.20210514\\\\HBuilderX\\\\plugins\\\\uniapp-cli\\\\node_modules\\\\@dcloudio\\\\vue-cli-plugin-uni\\\\packages\\\\vue-loader\\\\lib\\\\index.js??vue-loader-options!D:\\\\Program Files\\\\HBuilderX.3.1.13.20210514\\\\HBuilderX\\\\plugins\\\\uniapp-cli\\\\node_modules\\\\@dcloudio\\\\webpack-uni-mp-loader\\\\lib\\\\style.js!./StorePoster.vue?vue&type=template&id=0de5befa&scoped=true&\"","var components\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:\\\\Program Files\\\\HBuilderX.3.1.13.20210514\\\\HBuilderX\\\\plugins\\\\uniapp-cli\\\\node_modules\\\\babel-loader\\\\lib\\\\index.js!D:\\\\Program Files\\\\HBuilderX.3.1.13.20210514\\\\HBuilderX\\\\plugins\\\\uniapp-cli\\\\node_modules\\\\@dcloudio\\\\vue-cli-plugin-uni\\\\packages\\\\webpack-preprocess-loader\\\\index.js??ref--12-1!D:\\\\Program Files\\\\HBuilderX.3.1.13.20210514\\\\HBuilderX\\\\plugins\\\\uniapp-cli\\\\node_modules\\\\@dcloudio\\\\webpack-uni-mp-loader\\\\lib\\\\script.js!D:\\\\Program Files\\\\HBuilderX.3.1.13.20210514\\\\HBuilderX\\\\plugins\\\\uniapp-cli\\\\node_modules\\\\@dcloudio\\\\vue-cli-plugin-uni\\\\packages\\\\vue-loader\\\\lib\\\\index.js??vue-loader-options!D:\\\\Program Files\\\\HBuilderX.3.1.13.20210514\\\\HBuilderX\\\\plugins\\\\uniapp-cli\\\\node_modules\\\\@dcloudio\\\\webpack-uni-mp-loader\\\\lib\\\\style.js!./StorePoster.vue?vue&type=script&lang=js&\"; export default mod; export * from \"-!D:\\\\Program Files\\\\HBuilderX.3.1.13.20210514\\\\HBuilderX\\\\plugins\\\\uniapp-cli\\\\node_modules\\\\babel-loader\\\\lib\\\\index.js!D:\\\\Program Files\\\\HBuilderX.3.1.13.20210514\\\\HBuilderX\\\\plugins\\\\uniapp-cli\\\\node_modules\\\\@dcloudio\\\\vue-cli-plugin-uni\\\\packages\\\\webpack-preprocess-loader\\\\index.js??ref--12-1!D:\\\\Program Files\\\\HBuilderX.3.1.13.20210514\\\\HBuilderX\\\\plugins\\\\uniapp-cli\\\\node_modules\\\\@dcloudio\\\\webpack-uni-mp-loader\\\\lib\\\\script.js!D:\\\\Program Files\\\\HBuilderX.3.1.13.20210514\\\\HBuilderX\\\\plugins\\\\uniapp-cli\\\\node_modules\\\\@dcloudio\\\\vue-cli-plugin-uni\\\\packages\\\\vue-loader\\\\lib\\\\index.js??vue-loader-options!D:\\\\Program Files\\\\HBuilderX.3.1.13.20210514\\\\HBuilderX\\\\plugins\\\\uniapp-cli\\\\node_modules\\\\@dcloudio\\\\webpack-uni-mp-loader\\\\lib\\\\style.js!./StorePoster.vue?vue&type=script&lang=js&\"","<template>\r\n <view v-if=\"posterImageStatus\" class=\"poster-first\">\r\n <div class=\"posterCanvasWarp\">\r\n <canvas class=\"posterCanvas\" canvas-id=\"myCanvas\"></canvas>\r\n </div>\r\n <!-- <view class=\"poster-pop\" v-show=\"!canvasStatus\">\r\n <image\r\n :src=\"`${$VUE_APP_RESOURCES_URL}/images/poster-close.png`\"\r\n class=\"close\"\r\n @click=\"posterImageClose\"\r\n />\r\n <view class=\"canvas\" ref=\"poster\">\r\n <image class=\"image\" :src=\"posterData.image\" alt=\"商品图片\" />\r\n <view class=\"text black\">\r\n <text v-text=\"posterData.title\"></text>\r\n </view>\r\n <view class=\"text rad\">\r\n <text v-text=\"'¥' + posterData.price\"></text>\r\n </view>\r\n <view class=\"code\">\r\n <view class=\"code-img\">\r\n <image :src=\"posterData.code\" show-menu-by-longpress mode=\"widthFix\" alt=\"二维码\" />\r\n </view>\r\n <view class=\"code-text\">\r\n <text>长按识别二维码 立即购买</text>\r\n </view>\r\n </view>\r\n </view>\r\n <view class=\"save-poster\" @click=\"savePosterPath\">生成图片</view>\r\n </view>-->\r\n <view class=\"poster-pop\" v-show=\"canvasStatus\">\r\n <img :src=\"`${$VUE_APP_RESOURCES_URL}/images/poster-close.png`\" class=\"close\" @click=\"posterImageClose\" mode=\"widthFix\" />\r\n <image :src=\"posterImage\" alt=\"tp\" class=\"poster-image\" show-menu-by-longpress mode=\"widthFix\" />\r\n <view class=\"save-poster\" @click=\"saveImg\">保存海报</view>\r\n </view>\r\n <view class=\"mask\"></view>\r\n </view>\r\n</template>\r\n\r\n<script>\r\n// import html2canvas from \"html2canvas\";\r\nimport { PosterCanvas } from '@/utils'\r\nimport { getProductPoster } from '@/api/store'\r\n\r\nexport default {\r\n name: 'StorePoster',\r\n props: {\r\n posterImageStatus: Boolean,\r\n posterData: Object,\r\n goodId: String,\r\n },\r\n data: function() {\r\n return {\r\n canvasStatus: false,\r\n posterImage: '',\r\n }\r\n },\r\n watch: {\r\n posterImageStatus: function() {\r\n var that = this\r\n if (that.posterImageStatus === true) {\r\n that.$nextTick(function() {\r\n that.savePosterPath()\r\n })\r\n }\r\n },\r\n },\r\n mounted: function() {},\r\n methods: {\r\n posterImageClose: function() {\r\n this.posterImageStatus = false\r\n this.canvasStatus = false\r\n this.$emit('setPosterImageStatus')\r\n },\r\n saveImg: function() {\r\n this.downloadFile(this.posterImage)\r\n },\r\n downloadFile(url) {\r\n uni.downloadFile({\r\n url,\r\n fail: function(res) {\r\n console.log(res)\r\n\r\n uni.showModal({\r\n title: '提示',\r\n content: '保存失败',\r\n })\r\n },\r\n success: function(res) {\r\n console.log(res)\r\n uni.showModal({\r\n title: '提示',\r\n content: '保存成功',\r\n })\r\n },\r\n })\r\n },\r\n savePosterPath: function() {\r\n const that = this\r\n\r\n uni.showLoading({\r\n title: '海报生成中',\r\n mask: true,\r\n })\r\n getProductPoster(this.goodId, {\r\n from: this.$deviceType == 'weixin' || this.$deviceType == 'weixinh5' ? 'uniappH5' : this.$deviceType,\r\n })\r\n .then(res => {\r\n this.canvasStatus = true\r\n this.posterImage = res.data\r\n })\r\n .finally(() => {\r\n uni.hideLoading()\r\n })\r\n // return;\r\n // //清空图片重新生成\r\n // that.posterImage = \"\";\r\n // uni.showLoading({ title: \"海报生成中\", mask: true });\r\n // console.log(this);\r\n // var prodId = that.$yrouter.currentRoute.query.id;\r\n // uni.downloadFile({\r\n // url:\r\n // this.$VUE_APP_API_URL +\r\n // \"/shareImg/\" +\r\n // prodId +\r\n // \"?shareImgName=\" +\r\n // this.posterData.code,\r\n // fail: function(res) {},\r\n // success: function(res) {\r\n // that.canvasStatus = true;\r\n // that.posterImage = res.tempFilePath;\r\n // uni.hideLoading();\r\n // }\r\n // });\r\n },\r\n },\r\n}\r\n</script>\r\n\r\n<style scoped lang=\"less\" lang=\"less\">\r\n.poster-first {\r\n overscroll-behavior: contain;\r\n}\r\n\r\n.poster-pop {\r\n width: 4.5 * 100rpx;\r\n height: 8 * 100rpx;\r\n position: fixed;\r\n left: 50%;\r\n transform: translateX(-50%);\r\n z-index: 99;\r\n top: 50%;\r\n margin-top: -4.6 * 100rpx;\r\n}\r\n\r\n.poster-pop .canvas {\r\n background-color: #ffffff;\r\n height: 8 * 100rpx;\r\n}\r\n\r\n.poster-pop .poster-image {\r\n width: 100%;\r\n height: auto;\r\n}\r\n\r\n.poster-pop .canvas .image {\r\n width: 4.5 * 100rpx;\r\n height: 4.5 * 100rpx;\r\n display: block;\r\n}\r\n\r\n.poster-pop .canvas .text {\r\n text-align: center;\r\n color: #000000;\r\n margin-top: 0.32 * 100rpx;\r\n}\r\n\r\n.poster-pop .canvas .text.black {\r\n height: 0.68 * 100rpx;\r\n}\r\n\r\n.poster-pop .canvas .text.rad {\r\n color: #ff0000;\r\n}\r\n\r\n.poster-pop .canvas .code {\r\n height: 1.4 * 100rpx;\r\n display: flex;\r\n}\r\n\r\n.poster-pop .canvas .code .code-img {\r\n width: 33%;\r\n padding: 0.06 * 100rpx;\r\n}\r\n\r\n.poster-pop .canvas .code .code-img image {\r\n width: 100%;\r\n}\r\n\r\n.poster-pop .canvas .code .code-text {\r\n width: 60%;\r\n font-size: 0.12 * 100rpx;\r\n line-height: 1.64 * 100rpx;\r\n}\r\n\r\n.poster-pop .close {\r\n width: 0.46 * 100rpx;\r\n height: 0.75 * 100rpx;\r\n position: fixed;\r\n right: 0;\r\n top: -0.73 * 100rpx;\r\n display: block;\r\n}\r\n\r\n.poster-pop .save-poster {\r\n background-color: #df2d0a;\r\n font-size: 0.22 * 100rpx;\r\n color: #fff;\r\n text-align: center;\r\n height: 0.76 * 100rpx;\r\n line-height: 0.76 * 100rpx;\r\n width: 100%;\r\n margin-top: -0.1 * 100rpx;\r\n border-radius: 0 0 10rpx 10rpx;\r\n}\r\n\r\n.poster-pop .keep {\r\n color: #fff;\r\n text-align: center;\r\n font-size: 0.25 * 100rpx;\r\n margin-top: 0.1 * 100rpx;\r\n}\r\n\r\n.mask {\r\n position: fixed;\r\n top: 0;\r\n left: 0;\r\n right: 0;\r\n bottom: 0;\r\n background-color: rgba(0, 0, 0, 0.6);\r\n z-index: 9;\r\n}\r\n</style>\r\n","import mod from \"-!D:\\\\Program Files\\\\HBuilderX.3.1.13.20210514\\\\HBuilderX\\\\plugins\\\\uniapp-cli\\\\node_modules\\\\mini-css-extract-plugin\\\\dist\\\\loader.js??ref--10-oneOf-1-0!D:\\\\Program Files\\\\HBuilderX.3.1.13.20210514\\\\HBuilderX\\\\plugins\\\\uniapp-cli\\\\node_modules\\\\css-loader\\\\dist\\\\cjs.js??ref--10-oneOf-1-1!D:\\\\Program Files\\\\HBuilderX.3.1.13.20210514\\\\HBuilderX\\\\plugins\\\\uniapp-cli\\\\node_modules\\\\@dcloudio\\\\vue-cli-plugin-uni\\\\packages\\\\vue-loader\\\\lib\\\\loaders\\\\stylePostLoader.js!D:\\\\Program Files\\\\HBuilderX.3.1.13.20210514\\\\HBuilderX\\\\plugins\\\\uniapp-cli\\\\node_modules\\\\@dcloudio\\\\vue-cli-plugin-uni\\\\packages\\\\webpack-preprocess-loader\\\\index.js??ref--10-oneOf-1-2!D:\\\\Program Files\\\\HBuilderX.3.1.13.20210514\\\\HBuilderX\\\\plugins\\\\uniapp-cli\\\\node_modules\\\\postcss-loader\\\\src\\\\index.js??ref--10-oneOf-1-3!D:\\\\Program Files\\\\HBuilderX.3.1.13.20210514\\\\HBuilderX\\\\plugins\\\\uniapp-cli\\\\node_modules\\\\less-loader\\\\dist\\\\cjs.js??ref--10-oneOf-1-4!D:\\\\Program Files\\\\HBuilderX.3.1.13.20210514\\\\HBuilderX\\\\plugins\\\\uniapp-cli\\\\node_modules\\\\@dcloudio\\\\vue-cli-plugin-uni\\\\packages\\\\webpack-preprocess-loader\\\\index.js??ref--10-oneOf-1-5!D:\\\\Program Files\\\\HBuilderX.3.1.13.20210514\\\\HBuilderX\\\\plugins\\\\uniapp-cli\\\\node_modules\\\\@dcloudio\\\\vue-cli-plugin-uni\\\\packages\\\\vue-loader\\\\lib\\\\index.js??vue-loader-options!D:\\\\Program Files\\\\HBuilderX.3.1.13.20210514\\\\HBuilderX\\\\plugins\\\\uniapp-cli\\\\node_modules\\\\@dcloudio\\\\webpack-uni-mp-loader\\\\lib\\\\style.js!./StorePoster.vue?vue&type=style&index=0&id=0de5befa&scoped=true&lang=less&\"; export default mod; export * from \"-!D:\\\\Program Files\\\\HBuilderX.3.1.13.20210514\\\\HBuilderX\\\\plugins\\\\uniapp-cli\\\\node_modules\\\\mini-css-extract-plugin\\\\dist\\\\loader.js??ref--10-oneOf-1-0!D:\\\\Program Files\\\\HBuilderX.3.1.13.20210514\\\\HBuilderX\\\\plugins\\\\uniapp-cli\\\\node_modules\\\\css-loader\\\\dist\\\\cjs.js??ref--10-oneOf-1-1!D:\\\\Program Files\\\\HBuilderX.3.1.13.20210514\\\\HBuilderX\\\\plugins\\\\uniapp-cli\\\\node_modules\\\\@dcloudio\\\\vue-cli-plugin-uni\\\\packages\\\\vue-loader\\\\lib\\\\loaders\\\\stylePostLoader.js!D:\\\\Program Files\\\\HBuilderX.3.1.13.20210514\\\\HBuilderX\\\\plugins\\\\uniapp-cli\\\\node_modules\\\\@dcloudio\\\\vue-cli-plugin-uni\\\\packages\\\\webpack-preprocess-loader\\\\index.js??ref--10-oneOf-1-2!D:\\\\Program Files\\\\HBuilderX.3.1.13.20210514\\\\HBuilderX\\\\plugins\\\\uniapp-cli\\\\node_modules\\\\postcss-loader\\\\src\\\\index.js??ref--10-oneOf-1-3!D:\\\\Program Files\\\\HBuilderX.3.1.13.20210514\\\\HBuilderX\\\\plugins\\\\uniapp-cli\\\\node_modules\\\\less-loader\\\\dist\\\\cjs.js??ref--10-oneOf-1-4!D:\\\\Program Files\\\\HBuilderX.3.1.13.20210514\\\\HBuilderX\\\\plugins\\\\uniapp-cli\\\\node_modules\\\\@dcloudio\\\\vue-cli-plugin-uni\\\\packages\\\\webpack-preprocess-loader\\\\index.js??ref--10-oneOf-1-5!D:\\\\Program Files\\\\HBuilderX.3.1.13.20210514\\\\HBuilderX\\\\plugins\\\\uniapp-cli\\\\node_modules\\\\@dcloudio\\\\vue-cli-plugin-uni\\\\packages\\\\vue-loader\\\\lib\\\\index.js??vue-loader-options!D:\\\\Program Files\\\\HBuilderX.3.1.13.20210514\\\\HBuilderX\\\\plugins\\\\uniapp-cli\\\\node_modules\\\\@dcloudio\\\\webpack-uni-mp-loader\\\\lib\\\\style.js!./StorePoster.vue?vue&type=style&index=0&id=0de5befa&scoped=true&lang=less&\"","// extracted by mini-css-extract-plugin\n if(module.hot) {\n // 1634867349586\n var cssReload = require(\"D:/Program Files/HBuilderX.3.1.13.20210514/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":""} |