|
|
|
@ -157,7 +157,6 @@ |
|
|
|
// } |
|
|
|
|
|
|
|
if(this.userType=='user'){ |
|
|
|
updateTabBar.changeUser(); |
|
|
|
API.login(data, res=>{ |
|
|
|
console.log(res); |
|
|
|
// this.loginSuccess() |
|
|
|
@ -170,6 +169,7 @@ |
|
|
|
accounts.push(this.username); |
|
|
|
uni.setStorageSync('accounts', accounts); |
|
|
|
uni.setStorageSync('userType', 'user'); |
|
|
|
// updateTabBar.changeUser(); |
|
|
|
setTimeout(()=>{ |
|
|
|
uni.switchTab({ |
|
|
|
url:'/pages/home/home' |
|
|
|
@ -179,7 +179,6 @@ |
|
|
|
} |
|
|
|
|
|
|
|
if(this.userType=='agent'){ |
|
|
|
updateTabBar.changeAgent(); |
|
|
|
API.request('/passport/agentLogin', { |
|
|
|
phone: this.username, |
|
|
|
password: this.password |
|
|
|
@ -190,16 +189,16 @@ |
|
|
|
}) |
|
|
|
uni.setStorageSync('user_token', res.data.token); |
|
|
|
uni.setStorageSync('userType', 'agent'); |
|
|
|
// updateTabBar.changeAgent(); |
|
|
|
setTimeout(()=>{ |
|
|
|
uni.switchTab({ |
|
|
|
url:'/pages/home/home' |
|
|
|
url:'/pages/list/team' |
|
|
|
}) |
|
|
|
}, 1500) |
|
|
|
}, fail=>{}, false) |
|
|
|
} |
|
|
|
|
|
|
|
if(this.userType=='background'){ |
|
|
|
updateTabBar.changebackground(); |
|
|
|
API.request('/passport/adminLogin', { |
|
|
|
account_number: this.username, |
|
|
|
password: this.password |
|
|
|
@ -210,6 +209,7 @@ |
|
|
|
}) |
|
|
|
uni.setStorageSync('user_token', res.data.token); |
|
|
|
uni.setStorageSync('userType', 'background'); |
|
|
|
// updateTabBar.changebackground(); |
|
|
|
setTimeout(()=>{ |
|
|
|
uni.switchTab({ |
|
|
|
url:'/pages/home/home' |
|
|
|
|