已解决,我的是因为写了按需export default new VueRouter({
mode: "history", // 去掉路由地址的#
routes: [
// ‘/’为默认加载页面
{ path: "/", component: IntelligentRegistration },
{ path: "/IntelligentRegistration", component: IntelligentRegistration },
{ path: "/newsAndInformation", component: newsAndInformation },
{ path: "/personal", component: personal },
{ path: "/generalRegistration", component: generalRegistration },
{ path: "**", redirect: "IntelligentRegistration" } //错误路由 重新定向
]
});加载路由,所以只有主页得到了后台传来了权限,其他页没有
13 回答13k 阅读
7 回答2.1k 阅读
3 回答1.3k 阅读✓ 已解决
6 回答1.2k 阅读✓ 已解决
2 回答1.4k 阅读✓ 已解决
3 回答1.3k 阅读✓ 已解决
6 回答1.1k 阅读
参考这个问答 https://segmentfault.com/q/10...