vue-antd-admin icon indicating copy to clipboard operation
vue-antd-admin copied to clipboard

配置了不需要拦截路由未生效

Open y451687300 opened this issue 3 years ago • 0 comments

在router的index.js中配置了 // 不需要登录拦截的路由配置 const loginIgnore = { names: ['404', '403','注册'], //根据路由名称匹配 paths: ['/login','/register'], //根据路由fullPath匹配 /**

  • 判断路由是否包含在该配置中
  • @param route vue-router 的 route 对象
  • @returns {boolean} */ includes(route) { return this.names.includes(route.name) || this.paths.includes(route.path) } }

但是并没有生效进入 register还是会提示'认证 token 已过期,请重新登录'

y451687300 avatar Aug 11 '21 10:08 y451687300