1 line
15 KiB
Plaintext
1 line
15 KiB
Plaintext
{"version":3,"sources":["webpack:///D:/chenq/chen/hengmei/hengmei/components/empower.vue?9ccf","webpack:///D:/chenq/chen/hengmei/hengmei/components/empower.vue?21cc","webpack:///D:/chenq/chen/hengmei/hengmei/components/empower.vue?e3f6","webpack:///D:/chenq/chen/hengmei/hengmei/components/empower.vue?7b62","uni-app:///components/empower.vue","webpack:///D:/chenq/chen/hengmei/hengmei/components/empower.vue?86f9","webpack:///D:/chenq/chen/hengmei/hengmei/components/empower.vue?f4b1"],"names":[],"mappings":";;;;;;;;;;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAoH;AACpH;AAC2D;AACL;AACa;;;AAGnE;AACgL;AAChL,gBAAgB,uLAAU;AAC1B,EAAE,6EAAM;AACR,EAAE,kFAAM;AACR,EAAE,2FAAe;AACjB;AACA;AACA;AACA;AACA;AACA,EAAE,sFAAU;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;AAAqqB,CAAgB,mqBAAG,EAAC,C;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AC0BzrB;AACA,iBADA;AAEA;AACA;AACA,mBADA;AAEA,oBAFA,EADA;;AAKA;AACA,kBADA;AAEA,wCAFA,EALA;;AASA;AACA,kBADA;AAEA,iBAFA,EATA;;AAaA;AACA,kBADA;AAEA,iBAFA,EAbA;;AAiBA;AACA,kBADA;AAEA,gBAFA,EAjBA,EAFA;;;AAwBA,MAxBA,kBAwBA;AACA;AACA,iBADA;AAEA,iBAFA;;AAIA,GA7BA;AA8BA;AACA,SADA,mBACA;AACA,4DADA,CACA;AACA,+DAFA,CAEA;AACA,yDAHA,CAGA;AACA;AACA,KANA;AAOA,aAPA,qBAOA,KAPA,EAOA;AACA,oCADA,CACA;AACA;AACA;AACA;AACA,OAHA,MAGA;AACA;AACA;AACA;AACA,KAhBA;AAiBA,SAjBA,mBAiBA;AACA;AACA;AACA,oBAHA,CAGA;AACA;AACA,0BADA;AAEA;AACA;AACA;AACA,SALA;;AAOA;AACA,kBADA;AAEA,qBAFA;AAGA;AACA;AACA;AACA;AACA,SAPA;AAQA;AACA;AACA;AACA;AACA;AACA,SAbA;;AAeA,KA3CA;AA4CA;AACA,kBA7CA,0BA6CA,IA7CA,EA6CA,QA7CA,EA6CA;AACA;AACA;AACA;AACA,kBADA;AAEA,mCAFA,EAEA;AACA,sCAHA,EAGA;AACA,iCAJA,EAIA;AACA,mCALA,EAKA;AACA,2BANA,EAMA;AACA,+BAPA,EAOA;AACA,mCARA,EAQA;AACA,4DATA,EASA;AACA,gEAVA,EAUA;AACA,oDAXA,CAWA;AAXA;AAaA;AACA;AACA;AACA;AACA;AACA,OALA,EAKA,mBALA;AAMA,KAnEA;AAoEA;AACA,UArEA,kBAqEA,QArEA,EAqEA;AACA;AACA;AACA,qBADA,EACA;AACA,mCAFA,EAEA;AACA,sCAHA,EAGA;AACA,kBAJA,EAIA;AACA,+BALA,EAKA;AACA,mCANA,EAMA;AACA,2BAPA,EAOA;AACA,kBARA,EAQA;AACA,oBATA,CASA;AATA;AAWA;AACA;AACA;AACA;AACA;AACA,OALA,EAKA,mBALA;AAMA,KAxFA;AAyFA,kBAzFA,0BAyFA,QAzFA,EAyFA;AACA;AACA;AACA;AACA,wDAJA,CAIA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,mCADA,EACA;AACA,sCAFA,EAEA;AACA,iCAHA,EAGA;AACA,mCAJA,EAIA;AACA,2BALA,EAKA;AACA,mCANA,CAMA;AANA;AAQA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,KAlHA,EA9BA,E;;;;;;;;;;;;;AC1BA;AAAA;AAAA;AAAA;AAAk9B,CAAgB,46BAAG,EAAC,C;;;;;;;;;;;ACAt+B;AACA,OAAO,KAAU,EAAE,kBAKd","file":"components/empower.js","sourcesContent":["import { render, staticRenderFns, recyclableRender, components } from \"./empower.vue?vue&type=template&id=f547411c&\"\nvar renderjs\nimport script from \"./empower.vue?vue&type=script&lang=js&\"\nexport * from \"./empower.vue?vue&type=script&lang=js&\"\nimport style0 from \"./empower.vue?vue&type=style&index=0&lang=css&\"\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 = \"components/empower.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!./empower.vue?vue&type=template&id=f547411c&\"","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 \"-!../../../../../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!./empower.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!./empower.vue?vue&type=script&lang=js&\"","<template>\r\n\t<view>\r\n\t\t<view v-if=\"vision\" style=\"position: fixed;top: 0;right: 0;left: 0;bottom: 0;display: flex;justify-content: center;align-items: center;z-index: 3;\">\r\n\t\t\t<view style=\"background-color: #FFFFFF;border-radius: 10rpx;padding: 30rpx;box-shadow: 0rpx 0rpx 20rpx rgba(0,0,0,.5);margin: 0 100rpx;\">\r\n\t\t\t\t<view style=\"display: flex;\">\r\n\t\t\t\t\t<image :src=\"appletImg\" style=\"width: 96rpx;height: 96rpx;flex-shrink: 0;\" mode=\"\"></image>\r\n\t\t\t\t\t<view style=\"margin-left: 20rpx;\">\r\n\t\t\t\t\t\t<view style=\"font-size: 30rpx;font-weight: bold;\">恒美植发客服代表提醒您:</view>\r\n\t\t\t\t\t\t<view style=\"font-size: 28rpx;margin-top: 20rpx;color: #999999;\">您当前是游客身份</view>\r\n\t\t\t\t\t\t<view style=\"font-size: 28rpx;margin-top: 20rpx;color: #999999;\">是否选择授权登录</view>\r\n\t\t\t\t\t</view>\r\n\t\t\t\t</view>\r\n\t\t\t\t<view style=\"font-size: 28rpx;margin: 30rpx 0;border-bottom: 1rpx solid #F5F5F5;border-top: 1rpx solid #F5F5F5;padding: 20rpx 0;\">申请 获取你的昵称、头像、地区及性别</view>\r\n\t\t\t\t<view style=\"display: flex;justify-content: center;align-items: center;font-size: 24rpx;\">\r\n\t\t\t\t\t<view @tap=\"chooseBtn(0)\" :class=\"isNo?'isNyin':'noyin'\" style=\"color: #07ad60;background-color: #FFFFFF;padding: 12rpx 40rpx;border-radius: 4rpx;border: 1rpx solid #CCCCCC;\">暂不授权</view>\r\n\t\t\t\t\t<view @tap=\"chooseBtn(1)\" :class=\"isOk?'isOyin':'noyin'\" style=\"background-color: #07ad60;padding: 12rpx 40rpx;color: #FFFFFF;margin-left: 20rpx;border: 1rpx solid #07ad60;position: relative;\">\r\n\t\t\t\t\t\t<text>立即授权</text>\r\n\t\t\t\t\t\t<button open-type=\"getUserInfo\" @tap=\"shouq\" style=\"position: absolute;top: 0;left: 0;right: 0;bottom: 0;opacity: 0;\">立即授权</button>\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</view>\r\n</template>\r\n\r\n<script>\r\n\texport default {\r\n\t\tname:\"empower\",\r\n\t\tprops:{\r\n\t\t\tvision:{\r\n\t\t\t\ttype:Boolean,\r\n\t\t\t\tdefault:false\r\n\t\t\t},\r\n\t\t\tappletImg:{//小程序头像\r\n\t\t\t\ttype:String,\r\n\t\t\t\tdefault:'/static/public/like.png'\r\n\t\t\t},\r\n\t\t\tappletName:{//小程序名称\r\n\t\t\t\ttype:String,\r\n\t\t\t\tdefault:''\r\n\t\t\t},\r\n\t\t\turl:{\r\n\t\t\t\ttype:String,\r\n\t\t\t\tdefault:''\r\n\t\t\t},\r\n\t\t\tisWhere:{\r\n\t\t\t\ttype:Number,\r\n\t\t\t\tdefault:0\r\n\t\t\t}\r\n\t\t},\r\n\t\tdata() {\r\n\t\t\treturn {\r\n\t\t\t\tisOk:false,\r\n\t\t\t\tisNo:false\r\n\t\t\t};\r\n\t\t},\r\n\t\tmethods:{\r\n\t\t\ttiaoZ(){//跳转方式\r\n\t\t\t\tif(this.isWhere==0) uni.navigateBack({delta:1}) //返回上一页\r\n\t\t\t\tif(this.isWhere==1) uni.navigateTo({url:this.url})//跳转到指定页面\r\n\t\t\t\tif(this.isWhere!=0 && this.isWhere!=1) return//不跳转\r\n\t\t\t\tthis.isOk = false\r\n\t\t\t},\r\n\t\t\tchooseBtn(index){//暂不授权、立即授权\r\n\t\t\t\tthis.$emit('cancleEv',index)//继承事件\r\n\t\t\t\tif(index==0){//暂不授权\r\n\t\t\t\t\tthis.isOk = false\r\n\t\t\t\t\tthis.tiaoZ()\r\n\t\t\t\t} else {\r\n\t\t\t\t\tthis.isOk = !this.isOk\r\n\t\t\t\t\tthis.isNo = false\r\n\t\t\t\t}\r\n\t\t\t},\r\n\t\t\tshouq(){//立即授权事件\r\n\t\t\t\tlet ya = this;\r\n\t\t\t\tthis.$toolAll.tools.showToast('正在调起授权...')\r\n\t\t\t\tlet code = ''//声明code\r\n\t\t\t\tuni.login({// 获取登录用户code\r\n\t\t\t\t\tprovider: 'weixin',\r\n\t\t\t\t\tsuccess: function(result) {\r\n\t\t\t\t\t\tuni.hideToast()\r\n\t\t\t\t\t\tcode = result.code\r\n\t\t\t\t\t},\r\n\t\t\t\t});\r\n\t\t\t\tuni.getUserProfile({//调起微信授权弹框\r\n\t\t\t\t\tdesc: '登录',\r\n\t\t\t\t\tlang: 'zh_CN',\r\n\t\t\t\t\tsuccess: (res) => {\r\n\t\t\t\t\t\t// if(uni.getStorageSync('invite_code')!='') \r\n\t\t\t\t\t\tya.revise(res.userInfo)\r\n\t\t\t\t\t\t// else ya.updateUserInfo(code,res.userInfo)\r\n\t\t\t\t\t},\r\n\t\t\t\t\tfail: (res) => {\r\n\t\t\t\t\t\tconsole.log('用户拒绝授权');\r\n\t\t\t\t\t\tthis.tiaoZ()\r\n\t\t\t\t\t\tthis.$emit('cancleEv',0)\r\n\t\t\t\t\t\tthis.isOk = false\r\n\t\t\t\t\t}\r\n\t\t\t\t});\r\n\t\t\t},\r\n\t\t\t//调用登录接口\r\n\t\t\tupdateUserInfo(code,userInfo) {\r\n\t\t\t\tlet ya = this;\r\n\t\t\t\tuni.showToast({title: '授权中...',icon:'loading',})\r\n\t\t\t\tvar params = {\r\n\t\t\t\t\tcode:code,\r\n\t\t\t\t\tnickname: userInfo.nickName,//用户昵称\r\n\t\t\t\t\theadimgurl: userInfo.avatarUrl,//用户头像\r\n\t\t\t\t\tcountry: userInfo.country,//用户所在国家\r\n\t\t\t\t\tprovince: userInfo.province,//用户所在省份\r\n\t\t\t\t\tcity: userInfo.city,//用户所在城市\r\n\t\t\t\t\tgender: userInfo.gender,//用户性别\r\n\t\t\t\t\tlanguage:userInfo.language,//语言\r\n\t\t\t\t\tinvite_code:uni.getStorageSync('invite_code') || '',//用户邀请码\r\n\t\t\t\t\tinvite_source:uni.getStorageSync('invite_source') || '',//邀请码来源[def默认|link分享注册|qr扫码注册]\r\n\t\t\t\t\tchannel:uni.getStorageSync('channel') || ''//来源渠道,二维码或分享链接中携带的来源渠道参数\r\n\t\t\t\t}\r\n\t\t\t\tthis.$requst.post('user/login',params).then(res => {\r\n\t\t\t\t\tif(res.data.token!=''){\r\n\t\t\t\t\t\tconsole.log('第一次登录');\r\n\t\t\t\t\t\tya.successAfterEv(userInfo)\r\n\t\t\t\t\t}\r\n\t\t\t\t},error => {})\r\n\t\t\t},\r\n\t\t\t//修改个人信息\r\n\t\t\trevise(userInfo){\r\n\t\t\t\tuni.showToast({title: '授权中...',icon:'loading',})\r\n\t\t\t\tlet params = {\r\n\t\t\t\t\treal_name:'',//姓名\r\n\t\t\t\t\tnickname:userInfo.nickName,//昵称\r\n\t\t\t\t\theadimgurl:userInfo.avatarUrl,//头像\r\n\t\t\t\t\tmobile:'',//手机号\r\n\t\t\t\t\tgender:userInfo.gender,//性别,0未知,1男,2女\r\n\t\t\t\t\tprovince:userInfo.province,//省份\r\n\t\t\t\t\tcity:userInfo.city,//市\r\n\t\t\t\t\tcounty:'',//区县\r\n\t\t\t\t\tbirthday:''//生日(出生年月),日期格式:2021-08-10\r\n\t\t\t\t}\r\n\t\t\t\tthis.$requst.post('user/edit-info',params).then(res=>{\r\n\t\t\t\t\tif(res.code==0){\r\n\t\t\t\t\t\tconsole.log('修改信息');\r\n\t\t\t\t\t\tthis.successAfterEv(userInfo)\r\n\t\t\t\t\t}\r\n\t\t\t\t},error=>{})\r\n\t\t\t},\r\n\t\t\tsuccessAfterEv(userInfo){//缓存信息\r\n\t\t\t\tlet ya = this\r\n\t\t\t\tuni.hideToast()\r\n\t\t\t\tuni.setStorageSync('isShareK',true)\r\n\t\t\t\tuni.setStorageSync('headImg',userInfo.avatarUrl)//缓存用户头像\r\n\t\t\t\t// console.log(uni.getStorageSync('headImg'));\r\n\t\t\t\tya.$toolAll.tools.showToast('授权成功','success')\r\n\t\t\t\tuni.removeStorageSync('invite_code')\r\n\t\t\t\tuni.removeStorageSync('invite_source')\r\n\t\t\t\tuni.removeStorageSync('channel')\r\n\t\t\t\tlet comeOn = {\r\n\t\t\t\t\tnickname: userInfo.nickName,//用户昵称\r\n\t\t\t\t\theadimgurl: userInfo.avatarUrl,//用户头像\r\n\t\t\t\t\tcountry: userInfo.country,//用户所在国家\r\n\t\t\t\t\tprovince: userInfo.province,//用户所在省份\r\n\t\t\t\t\tcity: userInfo.city,//用户所在城市\r\n\t\t\t\t\tlanguage:userInfo.language,//语言\r\n\t\t\t\t}\r\n\t\t\t\tuni.setStorageSync('comeOn',comeOn)\r\n\t\t\t\tconsole.log(ya.url);\r\n\t\t\t\tif(ya.url!=''){\r\n\t\t\t\t\tsetTimeout(()=>{uni.navigateTo({url:ya.url})},1000)\r\n\t\t\t\t}\r\n\t\t\t\tya.$emit('cancleEv',0)\r\n\t\t\t\tya.$emit('buttonH',true)\r\n\t\t\t}\r\n\t\t}\r\n\t}\r\n</script>\r\n\r\n<style>\r\n.isNyin{box-shadow: 0rpx 3rpx 6rpx rgba(0,0,0,.5);}\r\n.isOyin{box-shadow: 0rpx 3rpx 6rpx rgba(0,0,0,1);}\r\n</style>\r\n","import mod from \"-!../../../../../HbuilderX/HBuilderX/plugins/uniapp-cli/node_modules/mini-css-extract-plugin/dist/loader.js??ref--6-oneOf-1-0!../../../../../HbuilderX/HBuilderX/plugins/uniapp-cli/node_modules/css-loader/dist/cjs.js??ref--6-oneOf-1-1!../../../../../HbuilderX/HBuilderX/plugins/uniapp-cli/node_modules/@dcloudio/vue-cli-plugin-uni/packages/vue-loader/lib/loaders/stylePostLoader.js!../../../../../HbuilderX/HBuilderX/plugins/uniapp-cli/node_modules/@dcloudio/vue-cli-plugin-uni/packages/webpack-preprocess-loader/index.js??ref--6-oneOf-1-2!../../../../../HbuilderX/HBuilderX/plugins/uniapp-cli/node_modules/postcss-loader/src/index.js??ref--6-oneOf-1-3!../../../../../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!./empower.vue?vue&type=style&index=0&lang=css&\"; export default mod; export * from \"-!../../../../../HbuilderX/HBuilderX/plugins/uniapp-cli/node_modules/mini-css-extract-plugin/dist/loader.js??ref--6-oneOf-1-0!../../../../../HbuilderX/HBuilderX/plugins/uniapp-cli/node_modules/css-loader/dist/cjs.js??ref--6-oneOf-1-1!../../../../../HbuilderX/HBuilderX/plugins/uniapp-cli/node_modules/@dcloudio/vue-cli-plugin-uni/packages/vue-loader/lib/loaders/stylePostLoader.js!../../../../../HbuilderX/HBuilderX/plugins/uniapp-cli/node_modules/@dcloudio/vue-cli-plugin-uni/packages/webpack-preprocess-loader/index.js??ref--6-oneOf-1-2!../../../../../HbuilderX/HBuilderX/plugins/uniapp-cli/node_modules/postcss-loader/src/index.js??ref--6-oneOf-1-3!../../../../../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!./empower.vue?vue&type=style&index=0&lang=css&\"","// extracted by mini-css-extract-plugin\n if(module.hot) {\n // 1629355716307\n var cssReload = require(\"D:/HbuilderX/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":""} |