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 @@ ...@@ -482,21 +482,7 @@
// 清除密码弹窗关闭标记,重新登录时重新检查 // 清除密码弹窗关闭标记,重新登录时重新检查
Util.delCookie('password_dialog_closed'); Util.delCookie('password_dialog_closed');
//强制要求微信绑定 window.location.href = '/';
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 = '/';
}
} else { } else {
this.errorMessage = res.msg; this.errorMessage = res.msg;
this.$message({ this.$message({
...@@ -537,21 +523,9 @@ ...@@ -537,21 +523,9 @@
type: 'success' type: 'success'
}); });
// 绑定成功后检查是否需要微信绑定 setTimeout(() => {
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 = '/';
} }, 1000);
} else { } else {
this.errorMessage = res.msg; this.errorMessage = res.msg;
this.$message({ 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