1
This commit is contained in:
+27
-17
@@ -63,7 +63,16 @@ export const constantRoutes = [
|
||||
},
|
||||
{
|
||||
path: '/',
|
||||
redirect: '/sloworder/index'
|
||||
redirect: () => {
|
||||
const store = require('@/store').default
|
||||
const { firstLeafPathFromSidebarRoutes } = require('@/utils/route-nav')
|
||||
const roles = store.getters.roles
|
||||
if (roles && roles.length > 0) {
|
||||
const p = firstLeafPathFromSidebarRoutes(store.getters.sidebarRouters)
|
||||
if (p) return p
|
||||
}
|
||||
return '/user/profile'
|
||||
}
|
||||
},
|
||||
{
|
||||
path: '/user',
|
||||
@@ -103,22 +112,6 @@ export const constantRoutes = [
|
||||
component: () => import('@/views/public/order-submit/index'),
|
||||
hidden: true
|
||||
},
|
||||
// 慢单管理(移到公共路由,无需权限)
|
||||
{
|
||||
path: '/sloworder',
|
||||
component: Layout,
|
||||
redirect: 'noredirect',
|
||||
name: 'SlowOrder',
|
||||
meta: { title: '下好的慢单', icon: 'list' },
|
||||
children: [
|
||||
{
|
||||
path: 'index',
|
||||
component: () => import('@/views/system/jdorder/orderList'),
|
||||
name: 'SlowOrderIndex',
|
||||
meta: { title: '下好的慢单', icon: 'list' }
|
||||
}
|
||||
]
|
||||
},
|
||||
// 移动端专用入口(隐藏菜单,底部导航直达)
|
||||
{
|
||||
path: '/mobile',
|
||||
@@ -149,6 +142,23 @@ export const constantRoutes = [
|
||||
|
||||
// 动态路由,基于用户权限动态去加载
|
||||
export const dynamicRoutes = [
|
||||
// 下好的慢单(需菜单/按钮权限 jdorder:sloworder:list)
|
||||
{
|
||||
path: '/sloworder',
|
||||
component: Layout,
|
||||
redirect: 'noredirect',
|
||||
name: 'SlowOrder',
|
||||
meta: { title: '下好的慢单', icon: 'list' },
|
||||
permissions: ['jdorder:sloworder:list'],
|
||||
children: [
|
||||
{
|
||||
path: 'index',
|
||||
component: () => import('@/views/system/jdorder/orderList'),
|
||||
name: 'SlowOrderIndex',
|
||||
meta: { title: '下好的慢单', icon: 'list' }
|
||||
}
|
||||
]
|
||||
},
|
||||
// 京粉订单管理
|
||||
{
|
||||
path: '/order',
|
||||
|
||||
Reference in New Issue
Block a user