提交者
Gitee
!772 修改未登录访问需要登录的资源,在登录后重定向丢失请求参数问题
Merge pull request !772 from who's hu/pr
正在显示
1 个修改的文件
包含
1 行增加
和
1 行删除
| @@ -45,7 +45,7 @@ router.beforeEach((to, from, next) => { | @@ -45,7 +45,7 @@ router.beforeEach((to, from, next) => { | ||
| 45 | // 在免登录白名单,直接进入 | 45 | // 在免登录白名单,直接进入 |
| 46 | next() | 46 | next() |
| 47 | } else { | 47 | } else { |
| 48 | - next(`/login?redirect=${to.fullPath}`) // 否则全部重定向到登录页 | 48 | + next(`/login?redirect=${encodeURIComponent(to.fullPath)}`) // 否则全部重定向到登录页 |
| 49 | NProgress.done() | 49 | NProgress.done() |
| 50 | } | 50 | } |
| 51 | } | 51 | } |
-
请 注册 或 登录 后发表评论