Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
P
pet-business-web
Project
Project
Details
Activity
Releases
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
刘怀志
pet-business-web
Commits
479346fe
Commit
479346fe
authored
May 23, 2023
by
v_liuhuaizhi
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
增加宠主管理路由
parent
d32feaff
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
24 additions
and
3 deletions
+24
-3
permission.js
src/permission.js
+2
-3
index.js
src/router/index.js
+22
-0
No files found.
src/permission.js
View file @
479346fe
...
...
@@ -11,8 +11,8 @@ NProgress.configure({ showSpinner: false })
const
whiteList
=
[
'/login'
,
'/register'
,
'/privacy-policy'
]
router
.
beforeEach
((
to
,
from
,
next
)
=>
{
console
.
log
(
'HHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHH'
,
to
,
from
,
next
)
NProgress
.
start
()
debugger
;
if
(
getToken
())
{
to
.
meta
.
title
&&
store
.
dispatch
(
'settings/setTitle'
,
to
.
meta
.
title
)
/* has token*/
...
...
@@ -20,7 +20,6 @@ router.beforeEach((to, from, next) => {
next
()
NProgress
.
done
()
}
else
{
console
.
log
(
'AAAAAAAAAAAAAAAAAAAAAAAAAAAAAA'
,
store
.
getters
.
roles
);
if
(
store
.
getters
.
roles
.
length
===
0
)
{
isRelogin
.
show
=
true
// 判断当前用户是否已拉取完user_info信息
...
...
@@ -34,7 +33,7 @@ router.beforeEach((to, from, next) => {
}).
catch
(
err
=>
{
store
.
dispatch
(
'LogOut'
).
then
(()
=>
{
Message
.
error
(
err
)
next
({
path
:
'/'
})
next
({
path
:
'/
login
'
})
})
})
}
else
{
...
...
src/router/index.js
View file @
479346fe
...
...
@@ -89,6 +89,28 @@ export const constantRoutes = [
},
]
},
{
path
:
'/customer-management'
,
component
:
Layout
,
hidden
:
true
,
permissions
:
[
'*:*:*'
],
children
:
[
//设备
{
path
:
'pet-owner-management'
,
props
:
true
,
permissions
:
[
'*:*:*'
],
component
:
()
=>
import
(
'@/views/customer-management/pet-owner-management/pet-owner-management'
),
name
:
'PetOwnerManagement'
,
meta
:
{
title
:
'宠主管理'
,
icon
:
'dashboard'
,
activeMenu
:
'/customer-management/pet-owner-management'
,
}
},
]
},
//行政详情路由
{
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
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 comment