Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
N
najiu-admin-template
Project
Project
Details
Activity
Releases
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Boards
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
najiu-frontend
najiu-admin-template
Commits
6676c950
Commit
6676c950
authored
Nov 10, 2020
by
vben
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
fix: fix the original page after login expired
parent
7675a9f6
Changes
3
Show whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
14 additions
and
11 deletions
+14
-11
CHANGELOG.zh_CN.md
CHANGELOG.zh_CN.md
+2
-0
permissionGuard.ts
src/router/guard/permissionGuard.ts
+11
-2
yarn.lock
yarn.lock
+1
-9
No files found.
CHANGELOG.zh_CN.md
View file @
6676c950
...
...
@@ -3,6 +3,8 @@
### 🐛 Bug Fixes
-
修复多个富文本编辑器只显示一个
-
修复登录过期后重新登录未跳转原来页面的
-
修复 window 系统动态引入错误
## 2.0.0-rc.9 (2020-11-9)
...
...
src/router/guard/permissionGuard.ts
View file @
6676c950
...
...
@@ -40,8 +40,17 @@ export function createPermissionGuard(router: Router) {
return
;
}
// redirect login page
const
redirectPath
=
to
.
path
?
`
${
LOGIN_PATH
}
?redirect=
${
to
.
path
}
`
:
LOGIN_PATH
;
next
(
redirectPath
);
const
redirectData
:
{
path
:
string
;
replace
:
boolean
;
query
?:
{
[
key
:
string
]:
string
}
}
=
{
path
:
LOGIN_PATH
,
replace
:
true
,
};
if
(
to
.
path
)
{
redirectData
.
query
=
{
...
redirectData
.
query
,
redirect
:
to
.
path
,
};
}
next
(
redirectData
);
return
;
}
if
(
permissionStore
.
getIsDynamicAddedRouteState
)
{
...
...
yarn.lock
View file @
6676c950
...
...
@@ -6944,7 +6944,7 @@ rollup@^1.31.1:
"@types/node" "*"
acorn "^7.1.0"
rollup@^2.32.1
, rollup@^2.33.1
:
rollup@^2.32.1:
version "2.33.1"
resolved "https://registry.npmjs.org/rollup/-/rollup-2.33.1.tgz#802795164164ee63cd47769d8879c33ec8ae0c40"
integrity sha512-uY4O/IoL9oNW8MMcbA5hcOaz6tZTMIh7qJHx/tzIJm+n1wLoY38BLn6fuy7DhR57oNFLMbDQtDeJoFURt5933w==
...
...
@@ -8162,14 +8162,6 @@ vfile@^4.0.0:
unist-util-stringify-position "^2.0.0"
vfile-message "^2.0.0"
vite-plugin-cdn@^1.0.0-beta.3:
version "1.0.0-beta.3"
resolved "https://registry.npmjs.org/vite-plugin-cdn/-/vite-plugin-cdn-1.0.0-beta.3.tgz#5846e80debba5e3968169931f5cba86aea5701cd"
integrity sha512-1oepxSSr8rROFhyP93EWVasKHAAbGfp3QyUrUmJW/zU80CvFPyHATckk8vy08pMiulErSqATjfofTJ+TxP4wkw==
dependencies:
lodash "^4.17.20"
rollup "^2.33.1"
vite-plugin-html@^1.0.0-beta.2:
version "1.0.0-beta.2"
resolved "https://registry.npmjs.org/vite-plugin-html/-/vite-plugin-html-1.0.0-beta.2.tgz#f30cdba4ca70469e62b770e32c407ce5d7f9b544"
...
...
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