wangfei
2024-11-18 a5a12dfed331c5d2508e1acee474c9d6dc35b774
UI-Project/src/router/index.js
@@ -85,18 +85,28 @@
            name: 'upreturns',
            component: () => import('../views/Returns/upreturns.vue')
          },
          {
            path: '/Returns/upreturns2',
            name: 'upreturns2',
            component: () => import('../views/Returns/upreturns2.vue')
          },
        ]
      },
      /*----------- 掰片/识别 ----------------*/
    {
      path: 'Identify',
      name: 'Identify',
      component: () => import('../views/Identify/identify.vue'),
      children:[
      name: 'ident',
      component: () => import('../views/Identify/ident.vue'),
      children: [
        {
          path: '/Identify/identify',
          name: 'identify',
          component: () => import('../views/Identify/identify.vue')
        },
        {
          path: '/Identify/identifwu',
          name: 'identifwu',
          component: () => import('../views/Identify/identifwu.vue')
        },
      ]
    },
@@ -116,6 +126,11 @@
        name: 'cachingun',
        component: () => import('../views/Caching/cachingun.vue')
      },
      {
        path: '/Caching/cachingyiwu',
        name: 'cachingyiwu',
        component: () => import('../views/Caching/cachingyiwu.vue')
      },
    ]
  },
  /*----------- 磨边(冷加工) ----------------*/
@@ -133,6 +148,11 @@
      path: '/StockBasicData/stockBasicDatatwo',
      name: 'stockBasicDatatwo',
      component: () => import('../views/StockBasicData/stockBasicDatatwo.vue')
    },
    {
      path: '/StockBasicData/stockBasicyiwu',
      name: 'stockBasicyiwu',
      component: () => import('../views/StockBasicData/stockBasicyiwu.vue')
    },
  ]
},
@@ -213,7 +233,7 @@
            }
          ]
        },
         /*----------- 可视化系统 ----------------*/
         {
          path: 'Visualization',
@@ -323,7 +343,7 @@
    
  ]
})
// 导航守卫  
router.beforeEach((to, from, next) => {  
  const isAuthenticated = !!localStorage.getItem('authToken'); // 假设这是你的登录状态检查逻辑  
@@ -333,4 +353,4 @@
    next(); // 否则继续导航  
  }  
}); 
export default router
export default router