Commit a68abdd4 by Joey

feat(@rbc/rbc-login): 已经登录的情况下直接回首页,不弹提示了

parent 70460e48
...@@ -117,7 +117,6 @@ export default { ...@@ -117,7 +117,6 @@ export default {
titleColor: 'black', titleColor: 'black',
Image: "", Image: "",
imgLoading: 0, imgLoading: 0,
checkLogin: window.osConfig.isDevelop ? false : true, // 默认当作已经登录了,因为已经登录的时候不能再进登录页
userData: { userData: {
username: "", username: "",
password: "", password: "",
...@@ -163,12 +162,15 @@ export default { ...@@ -163,12 +162,15 @@ export default {
mounted() { mounted() {
if (!window.osConfig.isDevelop) { if (!window.osConfig.isDevelop) {
window.GMS.util.nvwa.checkLogin().then(() => { window.GMS.util.nvwa.checkLogin().then(() => {
this.checkLogin = true const url = new URL(window.location.href)
this.$Message.error('您已登录,请先注销') url.searchParams.delete('nvwasys')
sessionStorage.clear()
window.location.href = url.origin
return
}).catch(() => { }).catch(() => {
this.checkLogin = false
}) })
} }
document.addEventListener('keyup', this.onKeyUp) document.addEventListener('keyup', this.onKeyUp)
this.getVerificationCode(); this.getVerificationCode();
}, },
...@@ -238,10 +240,6 @@ export default { ...@@ -238,10 +240,6 @@ export default {
}, },
submit() { submit() {
if (this.checkLogin) {
this.$Message.error('您已登录,请先注销')
return
}
this.$refs["userData"].validate((valid) => { this.$refs["userData"].validate((valid) => {
if (valid) { if (valid) {
this.loginLoading = true; this.loginLoading = true;
......
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 to comment