Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

为什么白名单不生效? #3534

Closed
yuqiaobinbin opened this issue Dec 5, 2020 · 3 comments
Closed

为什么白名单不生效? #3534

yuqiaobinbin opened this issue Dec 5, 2020 · 3 comments

Comments

@yuqiaobinbin
Copy link

yuqiaobinbin commented Dec 5, 2020

Question(提问)

为什么白名单不生效?

设置了白名单之后,如果跳转到注册界面:“http://localhost:9528/register”

还是会重定向到 Login界面 “http://localhost:9528/register#/login?redirect=%2Fdashboard”

Steps to reproduce(问题复现步骤)

  1. 修改permission.js, 添加’/register‘ 的白名单
  2. router/index 添加对应的route, 即'/register'
  3. 为route 目录添加对应的视图文件
  4. 在login视图文件中添加一个导航链接,导航到 ’/register‘

请问哪里出错了?为什么配置的白名单无效呢?

picture(截图)

1
2.
3
3.
2
4.
4

@yuqiaobinbin
Copy link
Author

路由方式的处理修改为history可跳转

@dalaocu
Copy link

dalaocu commented Aug 15, 2021

路由方式的处理修改为history可跳转

您好,我也碰到了相同的问题,请问history怎么修改,具体改哪个文件?

谢谢。

@dalaocu
Copy link

dalaocu commented Aug 15, 2021

找到了,这里把配置打开:

const createRouter = () => new Router({
mode: 'history', // require service support
scrollBehavior: () => ({ y: 0 }),
routes: constantRoutes
})

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants