Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
C
CFFP-HB
Overview
Overview
Details
Activity
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
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
Chao Sun
CFFP-HB
Commits
44ae8364
Commit
44ae8364
authored
Dec 05, 2022
by
kyle
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
路由守卫白名单问题修改
parent
44c8890d
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
1 additions
and
1 deletions
+1
-1
util/router.js
+1
-1
No files found.
util/router.js
View file @
44ae8364
...
...
@@ -39,7 +39,7 @@ function hasPermission (url) {
let
islogin
=
uni
.
getStorageSync
(
"isLogin"
);
//在这可以使用token、vuex
islogin
=
Boolean
(
Number
(
islogin
));
//返回布尔值
// 在白名单中或有登录判断条件可以直接跳转
if
(
whiteList
.
indexOf
(
url
)
!==
-
1
||
islogin
)
{
if
(
whiteList
.
indexOf
(
url
.
slice
(
0
,
url
.
indexOf
(
'?'
))
)
!==
-
1
||
islogin
)
{
return
true
}
return
false
...
...
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