diff --git a/src/main.js b/src/main.js index be03894..0571228 100644 --- a/src/main.js +++ b/src/main.js @@ -48,7 +48,12 @@ import jquery from "jquery"; Vue.prototype.$ = jquery; //使用钩子函数对路由进行权限跳转 router.beforeEach((to, from, next) => { - document.title = `${to.meta.title} | 视频监控可视化平台`; + if (to.meta.title == "") { + document.title = ` 视频监控可视化平台`; + } else { + document.title = `${to.meta.title} | 视频监控可视化平台`; + } + const role = localStorage.getItem("role"); const token = localStorage.getItem("token"); console.log(role, token); diff --git a/src/router/index.js b/src/router/index.js index 756148b..7b3fa7f 100644 --- a/src/router/index.js +++ b/src/router/index.js @@ -23,7 +23,7 @@ const routes = [ /* webpackChunkName: "dashboard" */ "../views/stritl/index.vue" ), meta: { - title: "系统首页", + title: "", icon: "el-icon-s-home", }, },