Commit eeabcb53 by liangjianmin

refactor(login): streamline login redirection logic

- Removed redundant checks for WeChat binding during login success and after successful binding.
- Simplified the redirection process to the homepage, enhancing code clarity and user experience.
parent f00e92e9
Showing with 3 additions and 29 deletions
......@@ -482,21 +482,7 @@
// 清除密码弹窗关闭标记,重新登录时重新检查
Util.delCookie('password_dialog_closed');
//强制要求微信绑定
if (!res.data.is_bind_wechat) {
this.$http('get', "/api/login/getwxqrcode").then(res => {
if (res.code === 0) {
window.location.href = res.data.wx_login_url;
} else {
this.$message({
message: res.msg,
type: 'warning'
});
}
})
} else {
window.location.href = '/';
}
window.location.href = '/';
} else {
this.errorMessage = res.msg;
this.$message({
......@@ -537,21 +523,9 @@
type: 'success'
});
// 绑定成功后检查是否需要微信绑定
if (!res.data.is_bind_wechat) {
this.$http('get', "/api/login/getwxqrcode").then(res => {
if (res.code === 0) {
window.location.href = res.data.wx_login_url;
} else {
this.$message({
message: res.msg,
type: 'warning'
});
}
})
} else {
setTimeout(() => {
window.location.href = '/';
}
}, 1000);
} else {
this.errorMessage = res.msg;
this.$message({
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or sign in to comment