|
@@ -55,35 +55,36 @@
|
|
|
}
|
|
|
console.log(e.target.encryptedData,'eeeeeee')
|
|
|
if (e.target.errMsg === 'getPhoneNumber:ok') {
|
|
|
- login({
|
|
|
- code: _this.code,
|
|
|
- encryptedData: e.target.encryptedData,
|
|
|
- iv: e.target.iv
|
|
|
- }).then(res => {
|
|
|
- uni.hideLoading();
|
|
|
- _this.code = ''
|
|
|
- console.log(res, 'login data')
|
|
|
- if (res.status == '200') {
|
|
|
- getApp().globalData.token = res.data
|
|
|
- _this.$u.vuex('vuex_token',res.data)
|
|
|
- if (_this.path === '/pages/index/index' || _this.lanuch) {
|
|
|
- uni.reLaunch({
|
|
|
- url: _this.path
|
|
|
- });
|
|
|
+ setTimeout(()=>{
|
|
|
+ login({
|
|
|
+ code: _this.code,
|
|
|
+ encryptedData: e.target.encryptedData,
|
|
|
+ iv: e.target.iv
|
|
|
+ }).then(res => {
|
|
|
+ uni.hideLoading();
|
|
|
+ _this.code = ''
|
|
|
+ console.log(res, 'login data')
|
|
|
+ if (res.status == '200') {
|
|
|
+ getApp().globalData.token = res.data
|
|
|
+ _this.$u.vuex('vuex_token',res.data)
|
|
|
+ if (_this.path === '/pages/index/index' || _this.lanuch) {
|
|
|
+ uni.reLaunch({
|
|
|
+ url: _this.path
|
|
|
+ });
|
|
|
+ } else {
|
|
|
+ uni.redirectTo({
|
|
|
+ url: _this.path
|
|
|
+ });
|
|
|
+ }
|
|
|
} else {
|
|
|
- uni.redirectTo({
|
|
|
- url: _this.path
|
|
|
+ uni.showToast({
|
|
|
+ title: res.message,
|
|
|
+ icon: 'none',
|
|
|
+ duration: 2500
|
|
|
});
|
|
|
}
|
|
|
- } else {
|
|
|
- uni.showToast({
|
|
|
- title: res.message,
|
|
|
- icon: 'none',
|
|
|
- duration: 2500
|
|
|
- });
|
|
|
- }
|
|
|
- });
|
|
|
-
|
|
|
+ });
|
|
|
+ },300)
|
|
|
} else {
|
|
|
uni.showToast({
|
|
|
title: '授权失败',
|