Skip to content
Toggle navigation
Projects
Groups
Snippets
Help
江名洋
/
linkwe-scrm
This project
Loading...
Sign in
Toggle navigation
Go to a project
Project
Repository
Issues
0
Merge Requests
0
Pipelines
Wiki
Settings
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Commit 35401cd9
authored
Mar 28, 2023
by
xinla
Browse Files
Options
Browse Files
Tag
Download
Email Patches
Plain Diff
--no commit message
1 parent
75542f59
Show whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
6 additions
and
5 deletions
linkwe-pc/src/router/index.js
linkwe-pc/src/store/modules/permission.js
linkwe-pc/src/router/index.js
View file @
35401cd
...
@@ -30,11 +30,12 @@ import visitor from '@/layout/visitor'
...
@@ -30,11 +30,12 @@ import visitor from '@/layout/visitor'
}
}
*/
*/
export
let
devRoutes
=
[]
// 固定业务菜单路由
export
let
fixedRoutes
=
[]
// 开发环境路由,总后台配置完菜单务必删除或注释,只在开发环境生效
// 开发环境路由,总后台配置完菜单务必删除或注释,只在开发环境生效
if
(
process
.
env
.
VUE_APP_ENV
===
'development'
)
{
if
(
process
.
env
.
VUE_APP_ENV
===
'development'
)
{
devRoutes
=
dev
Routes
.
concat
()
fixedRoutes
=
fixed
Routes
.
concat
()
}
}
// 公共路由
// 公共路由
...
@@ -176,5 +177,5 @@ export default new VueRouter({
...
@@ -176,5 +177,5 @@ export default new VueRouter({
// mode: process.env.VUE_APP_ENV === 'test' ? 'hash' : 'history', // history 下 element ui 存在bug
// mode: process.env.VUE_APP_ENV === 'test' ? 'hash' : 'history', // history 下 element ui 存在bug
// base: window.lwConfig.BASE_URL,
// base: window.lwConfig.BASE_URL,
scrollBehavior
:
()
=>
({
y
:
0
}),
scrollBehavior
:
()
=>
({
y
:
0
}),
routes
:
process
.
env
.
NODE_ENV
!==
'development'
?
constantRoutes
:
constantRoutes
.
concat
(
dev
Routes
),
routes
:
constantRoutes
.
concat
(
fixed
Routes
),
})
})
linkwe-pc/src/store/modules/permission.js
View file @
35401cd
import
router
,
{
constantRoutes
,
dev
Routes
}
from
'@/router'
import
router
,
{
constantRoutes
,
fixed
Routes
}
from
'@/router'
import
{
getRouters
}
from
'@/api/menu'
import
{
getRouters
}
from
'@/api/menu'
import
Layout
from
'@/layout/index'
import
Layout
from
'@/layout/index'
import
View
from
'@/layout/components/View'
import
View
from
'@/layout/components/View'
...
@@ -19,7 +19,7 @@ const permission = {
...
@@ -19,7 +19,7 @@ const permission = {
routes
.
forEach
((
e
)
=>
router
.
addRoute
(
e
))
routes
.
forEach
((
e
)
=>
router
.
addRoute
(
e
))
},
},
SET_TOPBAR_ROUTES
:
(
state
,
routes
)
=>
{
SET_TOPBAR_ROUTES
:
(
state
,
routes
)
=>
{
state
.
topbarRouters
=
routes
.
concat
(
dev
Routes
)
state
.
topbarRouters
=
routes
.
concat
(
fixed
Routes
)
},
},
SET_SIDEBAR_ROUTERS
:
(
state
,
routes
)
=>
{
SET_SIDEBAR_ROUTERS
:
(
state
,
routes
)
=>
{
state
.
sidebarRouters
=
routes
state
.
sidebarRouters
=
routes
...
...
Write
Preview
Markdown
is supported
Attach a file
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to post a comment