|
@@ -265,20 +265,19 @@ export default {
|
|
|
login(self.phone, self.code,userType,jsCode,this.tenantId).then(res => {
|
|
login(self.phone, self.code,userType,jsCode,this.tenantId).then(res => {
|
|
|
// 登录成功 (res.code === 0)
|
|
// 登录成功 (res.code === 0)
|
|
|
uni.hideLoading();
|
|
uni.hideLoading();
|
|
|
-
|
|
|
|
|
if (res.code === 0) {
|
|
if (res.code === 0) {
|
|
|
setAdminToken(res.data.sessionId)
|
|
setAdminToken(res.data.sessionId)
|
|
|
self.setUserInfo(res.data);
|
|
self.setUserInfo(res.data);
|
|
|
self.doLoginSuccess();
|
|
self.doLoginSuccess();
|
|
|
} else {
|
|
} else {
|
|
|
console.log('登录失败!' + res.msg);
|
|
console.log('登录失败!' + res.msg);
|
|
|
- uni.showToast({ title: err.msg || '登录失败', icon: 'none' });
|
|
|
|
|
|
|
+ uni.showToast({ title: res.msg || '登录失败', icon: 'none' });
|
|
|
}
|
|
}
|
|
|
}).catch(err => {
|
|
}).catch(err => {
|
|
|
// 登录失败 (res.code !== 0 或网络错误)
|
|
// 登录失败 (res.code !== 0 或网络错误)
|
|
|
uni.hideLoading();
|
|
uni.hideLoading();
|
|
|
console.error('登录失败:', err);
|
|
console.error('登录失败:', err);
|
|
|
- uni.showToast({ title: err.msg || '登录失败', icon: 'none' });
|
|
|
|
|
|
|
+ uni.showToast({ title: res.msg || '登录失败', icon: 'none' });
|
|
|
});
|
|
});
|
|
|
}
|
|
}
|
|
|
});
|
|
});
|