1 line
14 KiB
Plaintext
1 line
14 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"],"mappings":";;;;;;;;;;kDAAA;AACA;AACA,yH,6FAFmBA,EAAE,CAACC,iCAAH,GAAuCC,mBAAvC;AAGnBC,UAAU,CAACC,uBAAD,CAAV,C;;;;;;;;;;;;;ACHA;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;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;;;;;;;;ACnBA;AAAA;AAAA;AAAA;AAA2rB,CAAgB,0qBAAG,EAAC,C;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;ACyC/sB,uE;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;eACA,EACA,IADA,kBACA,CACA,SACA,oDADA,EAEA,8CAFA,EAEA;AACA,mBAHA,EAIA,yCAJA,EAKA,UALA,EAMA,cANA,EAOA,aAPA,EAQA,aARA,EAQA;AACA,oBATA,EASA;AACA,qBAVA,CAUA;AAVA,MAYA,CAdA,EAeA,MAfA,kBAeA,OAfA,EAeA,kBACA,sFACA,8BADA,CAEA;AACA;AAAA,WACA,kBACA,mBACA,qEACA;AACA,4BACA,2BACA;AACA,wDACA,wBACA,eACA,oCADA,EAEA,4CAFA,GAIA,yBACA,6BACA,6BACA,CACA,6BACA,6BACA,6BACA,CACA,4BACA,6BACA,6BACA,CACA,yBACA,6BACA;AACA;AACA;AACA;AACA;AACA;AACA,eA1BA;AA2BA;AACA;AACA;AACA;AACA;AACA;AACA,SApCA,MAoCA;AACA,OAvCA,EAuCA,6DAvCA;AAwCA;AACA,GA/DA;AAgEA;AACA,eADA,yBACA;AACA;AACA;AACA;AACA;AACA;AACA,aAFA;AAGA;AACA,SANA,MAMA;AACA,OARA,EAQA,8DARA;AASA,KAXA;AAYA,aAZA,qBAYA,KAZA,EAYA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,WAHA,EAGA,KAHA,CAGA,mBAHA;AAIA;AACA,SANA,MAMA;AACA;AACA;AACA;AACA,OAXA,EAWA,KAXA,CAWA,0DAXA;AAYA,KA5BA;AA6BA,WA7BA,qBA6BA;AACA;AACA;AACA;AACA;AACA,2BADA;AAEA;AACA;AACA;AACA;AACA;AACA,WAPA;AAQA;AACA;AACA,WAVA;;AAYA,OAdA,MAcA;AACA,KA9CA;AA+CA,aA/CA,uBA+CA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,aAHA,EAGA,KAHA,CAGA,mBAHA;AAIA,WALA;AAMA;AACA;AACA,SAZA,MAYA;AACA,OAfA,EAeA,8DAfA;AAgBA,KAnEA;AAoEA,YApEA,sBAoEA;AACA;AACA,KAtEA,EAhEA,E","file":"pagesB/personalPoster/personalPoster.js","sourcesContent":["import 'uni-pages';wx.__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\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: statusHNH+'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\tstatusHNH:uni.getStorageSync('electric_nav_height'),\r\n\t\t\t\tpublicColor:uni.getStorageSync('publicColor'),//主题颜色\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\ttitleList:[],//tab标题\r\n\t\t\t\ttabimgList:[],//tab图标\r\n\t\t\t\tshareFlag:true//是否允许点击分享\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\tthis.$toolAll.tools.isLogin() ;\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\tthis.$requst.post('index/mini-program-setting').then(res=>{\r\n\t\t\t\t\t// log('数据:',res);\r\n\t\t\t\t\tif(res.code==0){\r\n\t\t\t\t\t\tif(res.data.length!=0){\r\n\t\t\t\t\t\t\tif(res.data.footBar.length!=0){//底部导航\r\n\t\t\t\t\t\t\t\tres.data.footBar.forEach(item=>{\r\n\t\t\t\t\t\t\t\t\tlet newName = item.name\r\n\t\t\t\t\t\t\t\t\tlet newObj = {\r\n\t\t\t\t\t\t\t\t\t\ticonPath:this.$http + item.icon[0],\r\n\t\t\t\t\t\t\t\t\t\tselectedIconPath:this.$http + item.icon[1],\r\n\t\t\t\t\t\t\t\t\t}\r\n\t\t\t\t\t\t\t\t\tif(item.key==\"home\"){\r\n\t\t\t\t\t\t\t\t\t\tthis.tabimgList[0] = newObj\r\n\t\t\t\t\t\t\t\t\t\tthis.titleList[0] = newName\r\n\t\t\t\t\t\t\t\t\t}\r\n\t\t\t\t\t\t\t\t\tif(item.key==\"category\"){\r\n\t\t\t\t\t\t\t\t\t\tthis.tabimgList[1] = newObj\r\n\t\t\t\t\t\t\t\t\t\tthis.titleList[1] = newName\r\n\t\t\t\t\t\t\t\t\t}\r\n\t\t\t\t\t\t\t\t\tif(item.key==\"service\"){\r\n\t\t\t\t\t\t\t\t\t\tthis.tabimgList[2] = newObj\r\n\t\t\t\t\t\t\t\t\t\tthis.titleList[2] = newName\r\n\t\t\t\t\t\t\t\t\t}\r\n\t\t\t\t\t\t\t\t\tif(item.key==\"shop\"){\r\n\t\t\t\t\t\t\t\t\t\tthis.tabimgList[3] = newObj\r\n\t\t\t\t\t\t\t\t\t\tthis.titleList[3] = newName\r\n\t\t\t\t\t\t\t\t\t}\r\n\t\t\t\t\t\t\t\t\tif(item.key==\"my\"){\r\n\t\t\t\t\t\t\t\t\t\tthis.tabimgList[4] = newObj\r\n\t\t\t\t\t\t\t\t\t\tthis.titleList[4] = newName\r\n\t\t\t\t\t\t\t\t\t}\r\n\t\t\t\t\t\t\t\t})\r\n\t\t\t\t\t\t\t\tuni.setStorageSync('footTitle',this.titleList)\r\n\t\t\t\t\t\t\t\tuni.setStorageSync('footimg',this.tabimgList)\r\n\t\t\t\t\t\t\t\tthis.titleList = uni.getStorageSync('footTitle')\r\n\t\t\t\t\t\t\t\tthis.tabimgList = uni.getStorageSync('footimg')\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},\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":""} |