dedsudiyu 2 年之前
父節點
當前提交
f8e5a17bec
共有 2 個文件被更改,包括 9 次插入9 次删除
  1. 6 6
      src/router/index.js
  2. 3 3
      src/views/loginOne.vue

+ 6 - 6
src/router/index.js

@@ -29,7 +29,12 @@ import Layout from '@/layout'
 export const constantRoutes = [
   {
     path: '/',
-    component: (resolve) => require(['@/layout/index'], resolve),
+    component: (resolve) => require(['@/views/loginOne'], resolve),//home loginOne
+    hidden: true
+  },
+  {
+    path: '/login',
+    component: (resolve) => require(['@/views/loginOne'], resolve),
     hidden: true
   },
   {
@@ -51,11 +56,6 @@ export const constantRoutes = [
     ]
   },
   {
-    path: '/login',
-    component: (resolve) => require(['@/views/loginOne'], resolve),
-    hidden: true
-  },
-  {
     path: '/bigDataLogin',
     component: (resolve) => require(['@/views/bigDataLogin'], resolve),
     hidden: true

+ 3 - 3
src/views/loginOne.vue

@@ -287,8 +287,8 @@
                     }else if(res.code == 503){
                       this.userTypeCode = "5";
                     }
-                    this.loading = false;
                     this.getCodeOne();
+                    this.loading = false;
                     return
                   }
                   if(res.data.type){
@@ -307,6 +307,7 @@
                           for(let o=0;o<routeData[i].children.length;o++){
                             if(!routeData[i].children[o].alwaysShow&&!routeData[i].children[o].hidden){
                               let urlText = routeData[i].path + '/' + routeData[i].children[o].path;
+                              console.log("urlText=1",urlText)
                               this.$router.push({ path: this.redirect || urlText }).catch(()=>{});
                               return
                             }else{
@@ -314,6 +315,7 @@
                                 for(let x=0;x<routeData[i].children[o].children.length;x++){
                                   if(!routeData[i].children[o].children[x].alwaysShow&&!routeData[i].children[o].children[x].hidden){
                                     let urlText = routeData[i].path + '/' + routeData[i].children[o].path + '/' + routeData[i].children[o].children[x].path;
+                                    console.log("urlText=2",urlText)
                                     this.$router.push({ path: this.redirect || urlText }).catch(()=>{});
                                     return
                                   }
@@ -325,8 +327,6 @@
                       }
                     });
                   } else {
-                    console.log('1');
-                    this.loading = false;
                     // this.$router.push({ path: this.redirect || "/chemicalLibrary/medicUniversityHome" }).catch(()=>{});
                     this.$router.push({ path: this.redirect || "/chemicalLibrary/medicUniversityHome" }).catch(()=>{});
                   }