Commit 35401cd9 by xinla

--no commit message

1 parent 75542f59
......@@ -30,11 +30,12 @@ import visitor from '@/layout/visitor'
}
*/
export let devRoutes = []
// 固定业务菜单路由
export let fixedRoutes = []
// 开发环境路由,总后台配置完菜单务必删除或注释,只在开发环境生效
if (process.env.VUE_APP_ENV === 'development') {
devRoutes = devRoutes.concat()
fixedRoutes = fixedRoutes.concat()
}
// 公共路由
......@@ -176,5 +177,5 @@ export default new VueRouter({
// mode: process.env.VUE_APP_ENV === 'test' ? 'hash' : 'history', // history 下 element ui 存在bug
// base: window.lwConfig.BASE_URL,
scrollBehavior: () => ({ y: 0 }),
routes: process.env.NODE_ENV !== 'development' ? constantRoutes : constantRoutes.concat(devRoutes),
routes: constantRoutes.concat(fixedRoutes),
})
import router, { constantRoutes, devRoutes } from '@/router'
import router, { constantRoutes, fixedRoutes } from '@/router'
import { getRouters } from '@/api/menu'
import Layout from '@/layout/index'
import View from '@/layout/components/View'
......@@ -19,7 +19,7 @@ const permission = {
routes.forEach((e) => router.addRoute(e))
},
SET_TOPBAR_ROUTES: (state, routes) => {
state.topbarRouters = routes.concat(devRoutes)
state.topbarRouters = routes.concat(fixedRoutes)
},
SET_SIDEBAR_ROUTERS: (state, routes) => {
state.sidebarRouters = routes
......
Markdown is supported
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!