mirror of
https://github.com/crmeb/CRMEB.git
synced 2026-10-31 23:10:45 +00:00
improve: 个人中心手机号获取优化
This commit is contained in:
parent
2593180cb7
commit
a296d76eda
@ -170,7 +170,7 @@
|
||||
userEdit,
|
||||
getLogout,
|
||||
getLangList,
|
||||
getLangJson,
|
||||
getLangJson,
|
||||
mpBindingPhone
|
||||
} from '@/api/user.js';
|
||||
import {
|
||||
@ -257,29 +257,31 @@
|
||||
});
|
||||
},
|
||||
getphonenumber(e) {
|
||||
Routine.getCode()
|
||||
.then(code => {
|
||||
let data = {
|
||||
code,
|
||||
iv: e.detail.iv,
|
||||
encryptedData: e.detail.encryptedData,
|
||||
}
|
||||
mpBindingPhone(data).then(res => {
|
||||
this.getUserInfo()
|
||||
this.$util.Tips({
|
||||
title: res.msg,
|
||||
icon: 'success'
|
||||
});
|
||||
}).catch(err => {
|
||||
return this.$util.Tips({
|
||||
title: err
|
||||
});
|
||||
console.log(e)
|
||||
if (e.detail.errMsg == 'getPhoneNumber:ok') {
|
||||
Routine.getCode()
|
||||
.then(code => {
|
||||
let data = {
|
||||
code,
|
||||
iv: e.detail.iv,
|
||||
encryptedData: e.detail.encryptedData,
|
||||
}
|
||||
mpBindingPhone(data).then(res => {
|
||||
this.getUserInfo()
|
||||
this.$util.Tips({
|
||||
title: res.msg,
|
||||
icon: 'success'
|
||||
});
|
||||
}).catch(err => {
|
||||
return this.$util.Tips({
|
||||
title: err
|
||||
});
|
||||
})
|
||||
})
|
||||
})
|
||||
.catch(error => {
|
||||
uni.hideLoading();
|
||||
});
|
||||
|
||||
.catch(error => {
|
||||
uni.hideLoading();
|
||||
});
|
||||
}
|
||||
},
|
||||
setLang() {
|
||||
this.array.map((item, i) => {
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user