dedsudiyu 10 ay önce
ebeveyn
işleme
e6318995e7
1 değiştirilmiş dosya ile 8 ekleme ve 4 silme
  1. 8 4
      src/views/login.vue

+ 8 - 4
src/views/login.vue

@@ -225,10 +225,14 @@
                             localStorage.setItem('token',res.data.token);
                             //身份字段规则转义 原定11老师 22学生  新版本后0系统1老师2学生,这里身份字段转义为旧版本规则
                             localStorage.setItem('userType',res.data.userType)
-                            this.getExploitConfig();
-                            this.fullScreen();
-                            this.getInfo();
-                            this.$router.push({path:'/home'});
+                            //等待配置与字段获取到后跳转
+                            Promise.all([
+                                this.getExploitConfig(),
+                                this.getInfo(),
+                                this.fullScreen(),
+                            ]).then((result)=>{
+                                this.$router.push({path:'/home'});
+                            }).catch((error) => {})
                         }
                     }else{
                         if(res.code == 5007){