账号密码登录
微信安全登录
微信扫描二维码登录

登录后绑定QQ、微信即可实现信息互通

手机验证码登录
找回密码返回
邮箱找回 手机找回
注册账号返回
其他登录方式
分享
  • 收藏
    X
    关于vue admin element的权限
    36
    0
    router/indexexport const constantRoutes = [ // ... { path: '/', component: Layout, redirect: '/company/index' }]/** * asyncRoutes * the routes that need to be dynamically loaded based on user roles */export const asyncRoutes = [ // 项目的路由开始 { path: '/company', component: Layout, redirect: '/company/index', name: 'Company', meta: { title: '入驻页', icon: 'guide', roles: ['editor'] }, alwaysShow: false, children: [ { path: 'index', component: () => import('@/views/company/index'), name: 'CompanyIndex', meta: { title: '欢迎页', icon: 'guide', noCache: true } }, { path: 'base', component: () => import('@/views/company/base'), name: 'CompanyBase', hidden: true, meta: { title: '表单页', icon: 'guide', noCache: false, keepAlive: true } // , roles: ['editor'] }, { path: 'person', component: () => import('@/views/company/person'), name: 'CompanyPerson', hidden: true, meta: { title: '自然人页', icon: 'guide', noCache: true } }, { path: 'enterprise', component: () => import('@/views/company/enterprise'), name: 'CompanyEnterprise', hidden: true, meta: { title: '非自然人页', icon: 'guide', noCache: true } } ] }, // ....这个配置写的有毛病吗?为啥meta中一加roles角色设置都无法登陆。提示TypeError: roles.some is not a function以下是服务器端的响应我只是将mock/user下的代码移到服务器上了
    0
    打赏
    收藏
    点击回答
        全部回答
    • 0
    • 林景明 普通会员 1楼
      502 Bad Gateway

      502 Bad Gateway


      nginx
    更多回答
    扫一扫访问手机版
    • 回到顶部
    • 回到顶部