|
@@ -34,7 +34,8 @@
|
|
|
return {
|
|
return {
|
|
|
picUrlss: req.public.picUrls,
|
|
picUrlss: req.public.picUrls,
|
|
|
avatar: '',
|
|
avatar: '',
|
|
|
- nickName: ''
|
|
|
|
|
|
|
+ nickName: '',
|
|
|
|
|
+ sessionKey:''
|
|
|
};
|
|
};
|
|
|
},
|
|
},
|
|
|
|
|
|
|
@@ -55,6 +56,9 @@
|
|
|
// console.log('ready');
|
|
// console.log('ready');
|
|
|
// console.log('isUpdateInfo==',this.updateInfo)
|
|
// console.log('isUpdateInfo==',this.updateInfo)
|
|
|
// console.log('isUpdateMobile==',this.updateMobile)
|
|
// console.log('isUpdateMobile==',this.updateMobile)
|
|
|
|
|
+ app.globalData.getCheckSessoin(json => {
|
|
|
|
|
+ this.sessionKey = json.session_key;
|
|
|
|
|
+ });
|
|
|
},
|
|
},
|
|
|
|
|
|
|
|
methods: {
|
|
methods: {
|
|
@@ -108,29 +112,26 @@
|
|
|
},
|
|
},
|
|
|
getPhoneNumber(e) {
|
|
getPhoneNumber(e) {
|
|
|
let that = this;
|
|
let that = this;
|
|
|
- let sessionKey = '';
|
|
|
|
|
- app.globalData.getCheckSessoin(json => {
|
|
|
|
|
- sessionKey = json.session_key;
|
|
|
|
|
- let _params = {
|
|
|
|
|
- sessionKey: sessionKey,
|
|
|
|
|
- iv: e.detail.iv,
|
|
|
|
|
- encryptedData: e.detail.encryptedData
|
|
|
|
|
- };
|
|
|
|
|
- if (req.getStorage('pidCode')) {
|
|
|
|
|
- _params.parentId = req.getStorage('pidCode');
|
|
|
|
|
- }
|
|
|
|
|
- if (e.detail.errMsg == 'getPhoneNumber:ok') {
|
|
|
|
|
- req.postRequest('/api/weixin/mobile', _params, json => {
|
|
|
|
|
- if (json.mobile) {
|
|
|
|
|
- var userInfo = req.getStorage('userInfo');
|
|
|
|
|
- userInfo.mobile = json.mobile;
|
|
|
|
|
- req.setStorage('userInfo', userInfo);
|
|
|
|
|
- this.$emit('updateMobile', true);
|
|
|
|
|
- this.closeUpdate();
|
|
|
|
|
- }
|
|
|
|
|
- });
|
|
|
|
|
- } else {}
|
|
|
|
|
- });
|
|
|
|
|
|
|
+ let sessionKey = this.sessionKey;
|
|
|
|
|
+ let _params = {
|
|
|
|
|
+ sessionKey: sessionKey,
|
|
|
|
|
+ iv: e.detail.iv,
|
|
|
|
|
+ encryptedData: e.detail.encryptedData
|
|
|
|
|
+ };
|
|
|
|
|
+ if (req.getStorage('pidCode')) {
|
|
|
|
|
+ _params.parentId = req.getStorage('pidCode');
|
|
|
|
|
+ }
|
|
|
|
|
+ if (e.detail.errMsg == 'getPhoneNumber:ok') {
|
|
|
|
|
+ req.postRequest('/api/weixin/mobile', _params, json => {
|
|
|
|
|
+ if (json.mobile) {
|
|
|
|
|
+ var userInfo = req.getStorage('userInfo');
|
|
|
|
|
+ userInfo.mobile = json.mobile;
|
|
|
|
|
+ req.setStorage('userInfo', userInfo);
|
|
|
|
|
+ this.$emit('updateMobile', true);
|
|
|
|
|
+ this.closeUpdate();
|
|
|
|
|
+ }
|
|
|
|
|
+ });
|
|
|
|
|
+ } else {}
|
|
|
},
|
|
},
|
|
|
closeUpdate(){
|
|
closeUpdate(){
|
|
|
this.$emit('closeUpdate');
|
|
this.$emit('closeUpdate');
|