dedsudiyu пре 10 месеци
родитељ
комит
959a671ead
1 измењених фајлова са 6 додато и 4 уклоњено
  1. 6 4
      src/views/login.vue

+ 6 - 4
src/views/login.vue

@@ -216,17 +216,19 @@
                 const userType = userInfo.userType
                 login(account, password, code, uuid, userType).then(res => {
                     if(res.code == 200){
-                        if(res.data.userType != '2'){
+                        if(res.data.userType != 3){
+                            this.text = "* 该账号非院级大屏账号,无权登录本系统.";
+                            this.loading = false;
+                            this.getCode();
+                        }else{
                             localStorage.setItem('userId',res.data.userId);
                             localStorage.setItem('token',res.data.token);
                             //身份字段规则转义 原定11老师 22学生  新版本后0系统1老师2学生,这里身份字段转义为旧版本规则
-                            localStorage.setItem('userType',res.data.userType==0||res.data.userType==1?'1':'2')
+                            localStorage.setItem('userType',res.data.userType)
                             this.getExploitConfig();
                             this.fullScreen();
                             this.getInfo();
                             this.$router.push({path:'/home'});
-                        }else{
-                            this.text = '该账号没有相关权限,请联系管理员.';
                         }
                     }else{
                         if(res.code == 5007){