Merge pull request #860 from mijuu/master

修复发布路径为非根目录时的登录跳转问题
This commit is contained in:
Lison 2018-08-10 15:14:12 +08:00 committed by GitHub
commit 00defd3a76
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 1 additions and 1 deletions

View File

@ -46,7 +46,7 @@ class httpRequest {
// 后端服务在个别情况下回报201待确认
if (data.code === 401) {
Cookies.remove(TOKEN_KEY)
window.location.href = '/#/login'
window.location.href = window.location.pathname + '#/login'
Message.error('未登录,或登录失效,请登录')
} else {
if (data.msg) Message.error(data.msg)