|
@@ -20,7 +20,7 @@ const router = createRouter({
|
|
|
component: () => import('@/views/mainContent/index.vue'),
|
|
|
meta: {
|
|
|
keepAlive: false,
|
|
|
- title: '主页',
|
|
|
+ title: '数据驱动飞行器智能优化设计平台',
|
|
|
},
|
|
|
},
|
|
|
|
|
@@ -55,7 +55,7 @@ router.beforeEach((to, from, next) => {
|
|
|
|
|
|
// 如果用户有 token,直接放行
|
|
|
if (token) {
|
|
|
- document.title = to.name || '默认标题'; // 设置页面标题
|
|
|
+ document.title = to.meta.title || '默认标题'; // 设置页面标题
|
|
|
next();
|
|
|
}
|
|
|
// 如果没有 token,并且目标页面不在白名单里,跳转到登录页
|