shmily1213 1 день назад
Родитель
Сommit
7db3fef425

+ 3 - 3
back-ui/src/components/Breadcrumb/index.vue

@@ -33,9 +33,9 @@ function getBreadcrumb() {
     matched = route.matched.filter((item) => item.meta && item.meta.title)
   }
   // 判断是否为首页
-  // if (!isDashboard(matched[0])) {
-  //   matched = [{ path: "/index", meta: { title: "首页" } }].concat(matched)
-  // }
+  if (!isDashboard(matched[0])) {
+    matched = [{ path: "/index", meta: { title: "首页" } }].concat(matched)
+  }
   levelList.value = matched.filter(item => item.meta && item.meta.title && item.meta.breadcrumb !== false)
 }
 function findPathNum(str, char = "/") {

+ 1 - 1
back-ui/src/layout/components/Navbar.vue

@@ -87,7 +87,7 @@ function logout() {
     type: 'warning'
   }).then(() => {
     userStore.logOut().then(() => {
-      location.href = '/admin/dz/cards'
+      location.href = '/admin/index'
     })
   }).catch(() => { })
 }

+ 8 - 8
back-ui/src/router/index.js

@@ -60,15 +60,15 @@ export const constantRoutes = [
     {
         path: '',
         component: Layout,
-        redirect: '/dz/cards',
-        hidden: true,
+        redirect: '/index',
+        hidden: false,
         children: [
-            // {
-            //     path: '/index',
-            //     component: () => import('@/views/index'),
-            //     name: 'Index',
-            //     meta: {title: '首页', icon: 'dashboard', affix: true}
-            // }
+            {
+                path: '/index',
+                component: () => import('@/views/index'),
+                name: 'Index',
+                meta: {title: '首页', icon: 'dashboard', affix: true}
+            }
         ]
     },
     {

+ 1 - 1
back-ui/src/utils/request.js

@@ -87,7 +87,7 @@ service.interceptors.response.use(res => {
         ElMessageBox.confirm('登录状态已过期,您可以继续留在该页面,或者重新登录', '系统提示', { confirmButtonText: '重新登录', cancelButtonText: '取消', type: 'warning' }).then(() => {
           isRelogin.show = false
           useUserStore().logOut().then(() => {
-            location.href = '/admin/dz/cards'
+            location.href = '/admin/index'
           })
       }).catch(() => {
         isRelogin.show = false