1 line
14 KiB
Plaintext
1 line
14 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;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;ACwBzrB;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,cADA,wBACA;AACA;AACA,KAHA;AAIA,SAJA,mBAIA;AACA,4DADA,CACA;AACA,+DAFA,CAEA;AACA,yDAHA,CAGA;AACA;AACA,KATA;AAUA,aAVA,qBAUA,KAVA,EAUA;AACA,oCADA,CACA;AACA;AACA;AACA;AACA,gDADA;;AAGA;AACA,OANA,MAMA;AACA;AACA;AACA;AACA,KAtBA;AAuBA,SAvBA,mBAuBA;AACA;AACA;AACA,oBAHA,CAGA;AACA;AACA,0BADA;AAEA;AACA;AACA;AACA,SALA;;AAOA;AACA,kBADA;AAEA,qBAFA;AAGA;AACA;AACA,SALA;AAMA;AACA;AACA;AACA;AACA;AACA,SAXA;;AAaA,KA/CA;AAgDA;AACA,kBAjDA,0BAiDA,IAjDA,EAiDA,QAjDA,EAiDA;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,oBATA;;AAWA;AACA;AACA;AACA;AACA,sDAHA,CAGA;AACA,wDAJA,CAIA;AACA,8DALA,CAKA;AACA,oEANA,CAMA;AACA;AACA;AACA;AACA,OAXA,EAWA,mBAXA;AAYA,KA3EA;AA4EA,kBA5EA,0BA4EA,QA5EA,EA4EA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,KAtFA,EA9BA,E;;;;;;;;;;;;;ACxBA;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 @touchmove.stop.prevent=\"moveHandle\" v-if=\"vision\" class=\"auth-box\">\r\n\t\t<view>\r\n\t\t\t<view class=\"auth-top\">\r\n\t\t\t\t<image :src=\"appletImg\" mode=\"\"></image>\r\n\t\t\t\t<view class=\"auth-top-content\">\r\n\t\t\t\t\t<view>恒美植发客服代表提醒您:</view>\r\n\t\t\t\t\t<view>您当前是游客身份</view>\r\n\t\t\t\t\t<view>是否选择授权登录</view>\r\n\t\t\t\t</view>\r\n\t\t\t</view>\r\n\t\t\t<view class=\"auth-center\">申请 获取你的昵称、头像、地区及性别</view>\r\n\t\t\t<view class=\"auth-bottom\">\r\n\t\t\t\t<view @tap=\"chooseBtn(0)\" :class=\"isNo?'isNyin':'noyin'\" class=\"btn btn-no\">暂不授权</view>\r\n\t\t\t\t<view @tap=\"chooseBtn(1)\" :class=\"isOk?'isOyin':'noyin'\" class=\"btn btn-yes\">\r\n\t\t\t\t\t<text>立即授权</text>\r\n\t\t\t\t\t<button open-type=\"getUserInfo\" @tap=\"shouq\" class=\"auth-btn\">立即授权</button>\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\tmoveHandle(){\r\n\t\t\t\treturn false\r\n\t\t\t},\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\t// this.tiaoZ()\r\n\t\t\t\t\tuni.navigateTo({\r\n\t\t\t\t\t\turl:'/pages/tabbar/pagehome/pagehome'\r\n\t\t\t\t\t})\r\n\t\t\t\t\tthis.isOk = false\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\tya.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\tis_active:1\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\tuni.setStorageSync('params',params)\r\n\t\t\t\t\t\tuni.setStorageSync('userId',res.data.account_id)\r\n\t\t\t\t\t\tuni.setStorageSync('token',res.data.token)//缓存token\r\n\t\t\t\t\t\tuni.setStorageSync('expire',res.data.expire)//缓存失效时间(时间戳格式)\r\n\t\t\t\t\t\tuni.setStorageSync('is_active',res.data.is_active)//是否第一次授权\r\n\t\t\t\t\t\tuni.setStorageSync('phone_active',res.data.phone_active)//是否绑定手机号\r\n\t\t\t\t\t\tuni.setStorageSync('invite_code',res.data.invite_code)\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\tsuccessAfterEv(userInfo){//缓存信息\r\n\t\t\t\tlet ya = this\r\n\t\t\t\tuni.hideToast()\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\tya.$emit('cancleEv',0)\r\n\t\t\t\tya.$emit('buttonH',true)\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}\r\n\t\t}\r\n\t}\r\n</script>\r\n\r\n<style>\r\n\t.auth-box {position: fixed;top: 0;right: 0;left: 0;bottom: 0;display: flex;justify-content: center;align-items: center;z-index: 3;}\r\n\t.auth-box > view {background-color: #FFFFFF;border-radius: 10rpx;padding: 30rpx;box-shadow: 0rpx 0rpx 20rpx rgba(0,0,0,.5);margin: 0 100rpx;}\r\n\t.auth-top {display: flex;}\r\n\t.auth-top image {width: 96rpx;height: 96rpx;flex-shrink: 0;}\r\n\t.auth-top-content {margin-left: 20rpx;}\r\n\t.auth-top-content view {font-size: 28rpx;margin-top: 20rpx;color: #999999;}\r\n\t.auth-top-content view:nth-child(1) {font-size: 30rpx;font-weight: bold;margin-top: 0;}\r\n\t.auth-center {font-size: 28rpx;margin: 30rpx 0;border-bottom: 1rpx solid #F5F5F5;border-top: 1rpx solid #F5F5F5;padding: 20rpx 0;}\r\n\t.auth-bottom {display: flex;justify-content: center;align-items: center;font-size: 24rpx;}\r\n\t.btn {padding: 12rpx 40rpx;border-radius: 4rpx;}\r\n\t.btn-no {color: #07ad60;background-color: #FFFFFF;border: 1rpx solid #CCCCCC;}\r\n\t.btn-yes {color: #FFFFFF;background-color: #07ad60;border: 1rpx solid #07ad60;position: relative;margin-left: 20rpx;}\r\n\t.auth-btn {position: absolute;top: 0;left: 0;right: 0;bottom: 0;opacity: 0;}\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 // 1646122517173\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":""} |