Commit be38b05f by Joey

feat(@rbc/rbc-login): 已经登录的用户不能重复登录,需先注销

parent 120cd9bd
......@@ -117,6 +117,7 @@ export default {
titleColor: 'black',
Image: "",
imgLoading: 0,
checkLogin: true, // 默认当作已经登录了,因为已经登录的时候不能再进登录页
userData: {
username: "",
password: "",
......@@ -160,6 +161,12 @@ export default {
this.getLoginAssetsInfo();
},
mounted() {
window.GMS.util.nvwa.checkLogin().then(() => {
this.checkLogin = true
this.$Message.error('您已登录,请先注销')
}).catch(() => {
this.checkLogin = false
})
document.addEventListener('keyup', this.onKeyUp)
this.getVerificationCode();
},
......@@ -229,6 +236,10 @@ export default {
},
submit() {
if (this.checkLogin) {
this.$Message.error('您已登录,请先注销')
return
}
this.$refs["userData"].validate((valid) => {
if (valid) {
this.loginLoading = true;
......@@ -307,7 +318,7 @@ export default {
width: 100%;
height: 100%;
background-color: white;
z-index: 2000;
z-index: 100;
}
.login-img-bg {
......
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