1 line
12 KiB
Plaintext
1 line
12 KiB
Plaintext
{"version":3,"sources":["uni-app:///main.js","webpack:///D:/chenq/chen/hengmei/hengmei/pagesB/personalPoster/personalPoster.vue?9f6c","webpack:///D:/chenq/chen/hengmei/hengmei/pagesB/personalPoster/personalPoster.vue?d774","webpack:///D:/chenq/chen/hengmei/hengmei/pagesB/personalPoster/personalPoster.vue?e84c","webpack:///D:/chenq/chen/hengmei/hengmei/pagesB/personalPoster/personalPoster.vue?fe0f","uni-app:///pagesB/personalPoster/personalPoster.vue"],"names":["wx","__webpack_require_UNI_MP_PLUGIN__","__webpack_require__","createPage","Page","data","isShowT","imgList","imgSrc","showBtn","isHaib","shareFlag","computed","titleList","tabimgList","statusHeight","onLoad","methods","checkPoster","res","chooseImg","poster_src","uni","shareEv","path","success","type","action","id","console","fail","comfirmev","newArr","cancleev","delta"],"mappings":";;;;;;;;;;;;;AAAA;AAGA;AACA;AAHA;AACAA,EAAE,CAACC,iCAAiC,GAAGC,mBAAmB;AAG1DC,UAAU,CAACC,uBAAI,CAAC,C;;;;;;;;;;;;;ACLhB;AAAA;AAAA;AAAA;AAAA;AAA2H;AAC3H;AACkE;AACL;;;AAG7D;AACmL;AACnL,gBAAgB,uLAAU;AAC1B,EAAE,oFAAM;AACR,EAAE,yFAAM;AACR,EAAE,kGAAe;AACjB;AACA;AACA;AACA;AACA;AACA,EAAE,6FAAU;AACZ;AACA;;AAEA;AACe,gF;;;;;;;;;;;;ACtBf;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;;;;;;;;;;;;;ACAA;AAAA;AAAA;AAAA;AAAA;AAAA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;;;;;;;;AClBA;AAAA;AAAA;AAAA;AAA2rB,CAAgB,0qBAAG,EAAC,C;;;;;;;;;;;;;;;;;;ACyC/sB;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;eACA;EACAC;IACA;MACAC;MACAC;MACAC;MACAC;MACAC;MACAC;IACA;EACA;;EACAC;IACA;IACAC;MACA;IACA;IACA;IACAC;MACA;IACA;IACAC;MACA;IACA;EACA;EACAC;IACA;MACA;MACA;MAAA,KACA;MACA;IACA;EACA;EACAC;IACAC;MAAA;MAAA;MACA;QACA;UACA;YACAC;cACA;YACA;UACA;QACA;MACA;QAAA;MAAA;IACA;IACAC;MAAA;MAAA;MACA;MACA;MACA;MACA;QAAAC;MAAA;QACA;UACA;YACA;YACAC;UACA;UACA;QACA;UACA;UACA;QACA;MACA;QAAA;MAAA;IACA;IACAC;MAAA;MACA;MACA;QACA;QACAvB;UACAwB;UACAC;YACA;YACA;cAAAC;cAAAC;cAAAC;YAAA;cAAAC;YAAA;YACA;YACA;UACA;UACAC;YACA;UACA;QACA;MACA;QAAA;MAAA;IACA;IACAC;MAAA;MAAA;MACA;MACA;MACA;MACA;QACA;QACA;UACA;UACAC;UACAV;UACAU;YACA;cACA;cACAV;YACA;UACA;UACA;UACA;QACA;MACA;QAAA;MAAA;IACA;IACAW;MAAA;MACAX;QAAAY;MAAA;IACA;EACA;AACA;AAAA,2B","file":"pagesB/personalPoster/personalPoster.js","sourcesContent":["import 'uni-pages';\n// @ts-ignore\nwx.__webpack_require_UNI_MP_PLUGIN__ = __webpack_require__;\nimport Vue from 'vue'\nimport Page from './pagesB/personalPoster/personalPoster.vue'\ncreatePage(Page)","import { render, staticRenderFns, recyclableRender, components } from \"./personalPoster.vue?vue&type=template&id=bb8ea2e8&\"\nvar renderjs\nimport script from \"./personalPoster.vue?vue&type=script&lang=js&\"\nexport * from \"./personalPoster.vue?vue&type=script&lang=js&\"\n\n\n/* normalize component */\nimport normalizer from \"!../../../../../../HbuilderX/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 = \"pagesB/personalPoster/personalPoster.vue\"\nexport default component.exports","export * from \"-!../../../../../../HbuilderX/HBuilderX/plugins/uniapp-cli/node_modules/@dcloudio/vue-cli-plugin-uni/packages/vue-loader/lib/loaders/templateLoader.js??vue-loader-options!../../../../../../HbuilderX/HBuilderX/plugins/uniapp-cli/node_modules/@dcloudio/vue-cli-plugin-uni/packages/webpack-preprocess-loader/index.js??ref--16-0!../../../../../../HbuilderX/HBuilderX/plugins/uniapp-cli/node_modules/@dcloudio/webpack-uni-mp-loader/lib/template.js!../../../../../../HbuilderX/HBuilderX/plugins/uniapp-cli/node_modules/@dcloudio/vue-cli-plugin-uni/packages/webpack-uni-app-loader/page-meta.js!../../../../../../HbuilderX/HBuilderX/plugins/uniapp-cli/node_modules/@dcloudio/vue-cli-plugin-uni/packages/vue-loader/lib/index.js??vue-loader-options!../../../../../../HbuilderX/HBuilderX/plugins/uniapp-cli/node_modules/@dcloudio/webpack-uni-mp-loader/lib/style.js!./personalPoster.vue?vue&type=template&id=bb8ea2e8&\"","var components\nvar render = function () {\n var _vm = this\n var _h = _vm.$createElement\n var _c = _vm._self._c || _h\n if (!_vm._isMounted) {\n _vm.e0 = function ($event) {\n $event.stopPropagation()\n _vm.showBtn = false\n }\n _vm.e1 = function ($event) {\n $event.stopPropagation()\n _vm.showBtn = true\n }\n }\n}\nvar recyclableRender = false\nvar staticRenderFns = []\nrender._withStripped = true\n\nexport { render, staticRenderFns, recyclableRender, components }","import mod from \"-!../../../../../../HbuilderX/HBuilderX/plugins/uniapp-cli/node_modules/babel-loader/lib/index.js!../../../../../../HbuilderX/HBuilderX/plugins/uniapp-cli/node_modules/@dcloudio/vue-cli-plugin-uni/packages/webpack-preprocess-loader/index.js??ref--12-1!../../../../../../HbuilderX/HBuilderX/plugins/uniapp-cli/node_modules/@dcloudio/webpack-uni-mp-loader/lib/script.js!../../../../../../HbuilderX/HBuilderX/plugins/uniapp-cli/node_modules/@dcloudio/vue-cli-plugin-uni/packages/vue-loader/lib/index.js??vue-loader-options!../../../../../../HbuilderX/HBuilderX/plugins/uniapp-cli/node_modules/@dcloudio/webpack-uni-mp-loader/lib/style.js!./personalPoster.vue?vue&type=script&lang=js&\"; export default mod; export * from \"-!../../../../../../HbuilderX/HBuilderX/plugins/uniapp-cli/node_modules/babel-loader/lib/index.js!../../../../../../HbuilderX/HBuilderX/plugins/uniapp-cli/node_modules/@dcloudio/vue-cli-plugin-uni/packages/webpack-preprocess-loader/index.js??ref--12-1!../../../../../../HbuilderX/HBuilderX/plugins/uniapp-cli/node_modules/@dcloudio/webpack-uni-mp-loader/lib/script.js!../../../../../../HbuilderX/HBuilderX/plugins/uniapp-cli/node_modules/@dcloudio/vue-cli-plugin-uni/packages/vue-loader/lib/index.js??vue-loader-options!../../../../../../HbuilderX/HBuilderX/plugins/uniapp-cli/node_modules/@dcloudio/webpack-uni-mp-loader/lib/style.js!./personalPoster.vue?vue&type=script&lang=js&\"","<template>\r\n\t<view>\r\n\t\t<!-- 状态栏 -->\r\n\t\t<status-nav :titleVal=\"'二维码海报'\" :statusTitle=\"true\"></status-nav>\r\n\t\t<!-- 自定义二级分类 -->\r\n\t\t<!-- 列表 -->\r\n\t\t<view :style=\"{paddingTop: statusHeight+'px'}\" class=\"pad-zy20 pad-x180\">\r\n\t\t\t<view class=\"tc mar-s20 col6 fon28\">请选择海报背景后分享</view>\r\n\t\t\t<view v-if=\"imgList.length!=0\">\r\n\t\t\t\t<view class=\"mar-s20 disjbac fw\">\r\n\t\t\t\t\t<image lazy-load @tap=\"chooseImg(index)\" v-for=\"(item,index) in imgList\" :key=\"index\" class=\"width100 radius20 mar-x20\" :src=\"item\" style=\"width: 48.5%;max-height: 474rpx\" mode=\"aspectFill\" lazy-load></image>\r\n\t\t\t\t</view>\r\n\t\t\t</view>\r\n\t\t\t<view v-else class=\"disjcac fc\" style=\"margin-top: 50%;\">\r\n\t\t\t\t<image class=\"zanw-img mar-x50\" src=\"/static/public/zanwn.png\" mode=\"aspectFill\"></image>\r\n\t\t\t\t<view class=\"fon24 col3 mar-s50\" style=\"margin-top: 30%;\">暂无内容</view>\r\n\t\t\t</view>\r\n\t\t\t<!-- 预览弹框 -->\r\n\t\t\t<view v-if=\"showBtn\" @tap.stop=\"showBtn=false\" class=\"posAll disjcac fc pad-zy50\" style=\"z-index: 11;\">\r\n\t\t\t\t<image lazy-load :src=\"imgSrc\" @tap.stop=\"showBtn=true\" class=\"radius20\" style=\"width: 80%;\" mode=\"widthFix\"></image>\r\n\t\t\t\t<!-- 分享按钮 -->\r\n\t\t\t\t<view @tap.stop=\"shareEv\" class=\"disjcac radius20 posixzy\" style=\"height: 90rpx;margin: 20rpx 80rpx;background-color: #38CE51;line-height: 90rpx;bottom: 40rpx;\">\r\n\t\t\t\t\t<view class=\"disac\">\r\n\t\t\t\t\t\t<image src=\"/static/public/sharef.png\" style=\"width: 54rpx;height: 54rpx;\" mode=\"\"></image>\r\n\t\t\t\t\t\t<view class=\"fon40 bold colf mar-z10\">分享给好友</view>\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</view>\r\n\t\t<!-- 弹框 -->\r\n\t\t<pu-po :isShowT=\"imgList.length==0 && isHaib\" :contentVal=\"'立即生成创意海报'\" :clearVal=\"'暂不生成'\" :comfrimVal=\"'立即生成'\" @comfirmev=\"comfirmev\" @cancleev=\"cancleev\"></pu-po>\r\n\t\t<!-- 底部客服 -->\r\n\t\t<!-- <public-customer :nbottom=\"100\"></public-customer> -->\r\n\t\t<!-- 用户信息授权,手机号授权 -->\r\n\t\t<auth-userInfo-mobileInfo></auth-userInfo-mobileInfo>\r\n\t\t<!-- 底部tab -->\r\n\t\t<foot-tab :titleList=\"titleList\" :imgList=\"tabimgList\" :newcurrent='-1'></foot-tab>\r\n\t</view>\r\n</template>\r\n\r\n<script>\r\n\timport {base64ToPath} from '@/jsFile/base64-src.js';\r\n\texport default {\r\n\t\tdata() {\r\n\t\t\treturn {\r\n\t\t\t\tisShowT:true,\r\n\t\t\t\timgList:uni.getStorageSync('imgSrcList'),\r\n\t\t\t\timgSrc:'',\r\n\t\t\t\tshowBtn:false,\r\n\t\t\t\tisHaib:false,\r\n\t\t\t\tshareFlag:true//是否允许点击分享\r\n\t\t\t}\r\n\t\t},\r\n\t\tcomputed: {\r\n\t\t\t// 底部标题\r\n\t\t\ttitleList() {\r\n\t\t\t\treturn this.$store.state.titleList \r\n\t\t\t},\r\n\t\t\t// 底部图标\r\n\t\t\ttabimgList() {\r\n\t\t\t\treturn this.$store.state.imgList\r\n\t\t\t},\r\n\t\t\tstatusHeight() {\r\n\t\t\t\treturn this.$store.state.statusHeight\r\n\t\t\t}\r\n\t\t},\r\n\t\tonLoad(options) {\r\n\t\t\tif(uni.getStorageSync('phone_active')!=0 && uni.getStorageSync('is_active')!=0){\r\n\t\t\t\t//如果还没有生成海报\r\n\t\t\t\tif(uni.getStorageSync('imgSrcList')!='') this.imgSrcList = uni.getStorageSync('imgSrcList')//弹框关闭\r\n\t\t\t\telse this.imgList = []\r\n\t\t\t\tthis.checkPoster();\r\n\t\t\t}\r\n\t\t},\r\n\t\tmethods: {\r\n\t\t\tcheckPoster(){//查询海报模板\r\n\t\t\t\tthis.$requst.get('user/poster').then(res=>{\r\n\t\t\t\t\tif(res.code==0){\r\n\t\t\t\t\t\tif(res.data.list.length!=0){\r\n\t\t\t\t\t\t\tres.data.list.forEach(item=>{\r\n\t\t\t\t\t\t\t\tthis.imgList.push(this.$http + item);\r\n\t\t\t\t\t\t\t})\r\n\t\t\t\t\t\t}\r\n\t\t\t\t\t} else this.$toolAll.tools.showToast(res.msg);\r\n\t\t\t\t},error=>{this.$toolAll.tools.showToast(error.msg);})\r\n\t\t\t},\r\n\t\t\tchooseImg(index){//选择海报模板,并生成海报\r\n\t\t\t\tthis.imgSrc = '';\r\n\t\t\t\tthis.showBtn = true;\r\n\t\t\t\tthis.$toolAll.tools.showToast('正在生成海报...','loading',10000);\r\n\t\t\t\tthis.$requst.post('user/poster-info',{poster_src:this.imgList[index]}).then(res=>{\r\n\t\t\t\t\tif(res.code==0){\r\n\t\t\t\t\t\tbase64ToPath(res.data.poster).then(path => {\r\n\t\t\t\t\t\t\tthis.imgSrc = path;\r\n\t\t\t\t\t\t\tuni.setStorageSync('imgSrcP',path);\r\n\t\t\t\t\t\t}).catch(error => {})\r\n\t\t\t\t\t\tthis.$toolAll.tools.showToast('海报生成成功','none',1500);\r\n\t\t\t\t\t} else {\r\n\t\t\t\t\t\tthis.$toolAll.tools.showToast('海报生成失败','none',1500);\r\n\t\t\t\t\t\tthis.showBtn = false;\r\n\t\t\t\t\t} \r\n\t\t\t\t}).catch(err=>{this.$toolAll.tools.showToast(err.msg);})\r\n\t\t\t},\r\n\t\t\tshareEv(){\r\n\t\t\t\tthis.$toolAll.tools.showToast('正在调起分享...');\r\n\t\t\t\tif(this.shareFlag){\r\n\t\t\t\t\tthis.shareFlag = false;\r\n\t\t\t\t\twx.showShareImageMenu({\r\n\t\t\t\t\t path: this.imgSrc,\r\n\t\t\t\t\t\tsuccess:(res=>{\r\n\t\t\t\t\t\t\tthis.shareFlag = true;\r\n\t\t\t\t\t\t\tthis.$requst.post('user/record',{type:'other',action:'share',id:''}).then(res=>{console.log('分享成功:',res);},error=>{})\r\n\t\t\t\t\t\t\t// 调用tools.js中的种植埋点事件\r\n\t\t\t\t\t\t\tthis.$toolAll.tools.plantPoint(4);\r\n\t\t\t\t\t\t}),\r\n\t\t\t\t\t\tfail:(err=>{\r\n\t\t\t\t\t\t\tthis.shareFlag = true;\r\n\t\t\t\t\t\t})\r\n\t\t\t\t\t})\r\n\t\t\t\t} else {this.$toolAll.tools.showToast('请勿重复点击');}\r\n\t\t\t},\r\n\t\t\tcomfirmev(){//立即生成事件\r\n\t\t\t\tthis.$toolAll.tools.showToast('生成中...')\r\n\t\t\t\tthis.isShowT = false\r\n\t\t\t\t// 单张海报\r\n\t\t\t\tthis.$requst.get('user/personal-poster').then(res=>{\r\n\t\t\t\t\t// console.log('生成个人海报成功:',res);\r\n\t\t\t\t\tif(res.code==0){\r\n\t\t\t\t\t\tlet newArr = [];\r\n\t\t\t\t\t\tnewArr.push(res.data.poster)\r\n\t\t\t\t\t\tuni.hideToast()\r\n\t\t\t\t\t\tnewArr.forEach(item=>{\r\n\t\t\t\t\t\t\tbase64ToPath(item).then(path => {\r\n\t\t\t\t\t\t\t\tthis.imgList.push(path)\r\n\t\t\t\t\t\t\t\tuni.setStorageSync('imgSrcList',this.imgList)\r\n\t\t\t\t\t\t\t}).catch(error => {})\r\n\t\t\t\t\t\t})\r\n\t\t\t\t\t\tthis.$toolAll.tools.showToast('生成海报成功');\r\n\t\t\t\t\t\tthis.isHaib = false\r\n\t\t\t\t\t} else this.$toolAll.tools.showToast(res.msg);\r\n\t\t\t\t},error=>{this.$toolAll.tools.showToast(error.msg);})\r\n\t\t\t},\r\n\t\t\tcancleev(){//暂不生成事件\r\n\t\t\t\tuni.navigateBack({delta:1})\r\n\t\t\t}\r\n\t\t}\r\n\t}\r\n</script>\r\n\r\n<style>\r\n</style>\r\n"],"sourceRoot":""} |