Browse Source

首页路由异常处理

lph 1 year ago
parent
commit
77cadd467e
3 changed files with 25 additions and 22 deletions
  1. 5 2
      zkqy-ui/src/layout/index.vue
  2. 17 17
      zkqy-ui/src/router/index.js
  3. 3 3
      zkqy-ui/src/views/login.vue

+ 5 - 2
zkqy-ui/src/layout/index.vue

@@ -5,8 +5,9 @@
       <el-row>
         <el-col :span="12">
           <div class="logo-title">
-            <img :src="logo" alt="" class="imgg" />
-            <span class="title">{{ title }}</span>
+            <img v-if="logo" :src="logo" alt="" class="imgg" />
+            <!-- <img v-else src="../assets/images/mes412.svg" alt="" class="imgg" /> -->
+            <span class="title">{{ title || "工业应用引擎" }}</span>
           </div>
         </el-col>
         <el-col :span="4" :offset="8">
@@ -171,6 +172,8 @@ export default {
     var user = sessionStorage.getItem("sessionObj");
     var user = JSON.parse(user);
     this.userName = JSON.parse(user.data).username;
+  },
+  created() {
     this.getlogo();
   },
 };

+ 17 - 17
zkqy-ui/src/router/index.js

@@ -224,23 +224,23 @@ export const constantRoutes = [
       //   name: 'IndexOld',
       //   meta: { title: '首页1', icon: 'dashboard', affix: true }
       // },
-      {
-        path: '/asEditor',
-        component: Layout,
-        redirect: '/home',
-        component: () => import('../views/asEditor/layout'),
-        children: [
-          {
-            path: '/home',
-            name: 'home',
-            component: () => import('../views/asEditor/layout/home/index.vue'),
-          },
-        ]
-      },
-      {
-        path: '/H5',
-        component: () => import('../views/asEditor/layout/home/home.vue'),
-      },
+      // {
+      //   path: '/asEditor',
+      //   component: Layout,
+      //   redirect: '/home',
+      //   component: () => import('../views/asEditor/layout'),
+      //   children: [
+      //     {
+      //       path: '/home',
+      //       name: 'home',
+      //       component: () => import('../views/asEditor/layout/home/index.vue'),
+      //     },
+      //   ]
+      // },
+      // {
+      //   path: '/H5',
+      //   component: () => import('../views/asEditor/layout/home/home.vue'),
+      // },
     ]
   },
   {

+ 3 - 3
zkqy-ui/src/views/login.vue

@@ -431,9 +431,9 @@ export default {
   /* box-shadow: 0px 2px 4px rgba(0, 0, 0, 0.25); */
   opacity: 1;
   // 工联院样式
-  background-size: contain;
-  background-repeat: no-repeat;
-  background-position: center;
+  // background-size: contain;
+  // background-repeat: no-repeat;
+  // background-position: center;
 }
 
 .login {