From 7952d486d3f18e992bbc606a5a089710342f24c4 Mon Sep 17 00:00:00 2001 From: fan <18706759286@163.com> Date: Tue, 21 Apr 2020 15:47:25 +0800 Subject: [PATCH 1/6] =?UTF-8?q?=E8=B0=83=E6=95=B4=E8=A5=BF=E5=AE=89?= =?UTF-8?q?=E5=9C=B0=E9=93=81=E7=99=BB=E5=BD=95=E9=A1=B5=E9=9D=A2?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit (cherry picked from commit d44faf5) --- src/layout/components/Title.vue | 2 +- src/router/index_Common.js | 2 +- src/scripts/ProjectConfig.js | 10 ++++++++-- src/views/login/index.vue | 19 ++++++++++++++++--- 4 files changed, 26 insertions(+), 7 deletions(-) diff --git a/src/layout/components/Title.vue b/src/layout/components/Title.vue index 2cf1085d4..96a65c072 100644 --- a/src/layout/components/Title.vue +++ b/src/layout/components/Title.vue @@ -21,7 +21,7 @@ export default { }, mounted() { const project = getSessionStorage('project'); - this.systemTitle = loginInfo[project].title; + this.systemTitle = loginInfo[project].homeTitle || loginInfo[project].title; this.logoImg = ProjectIcon[project]; if (project.endsWith('hyd')) { this.isHyd = true; diff --git a/src/router/index_Common.js b/src/router/index_Common.js index 4b5946bb9..ae4706abc 100644 --- a/src/router/index_Common.js +++ b/src/router/index_Common.js @@ -901,7 +901,7 @@ const router = createRouter(); router.beforeEach((to, from, next) => { const project = getSessionStorage('project'); - document.title = loginInfo[project || 'login'].title; + document.title = loginInfo[project || 'login'].browserTitle || loginInfo[project || 'login'].title; next(); }); diff --git a/src/scripts/ProjectConfig.js b/src/scripts/ProjectConfig.js index 43ad16fd3..088420a02 100644 --- a/src/scripts/ProjectConfig.js +++ b/src/scripts/ProjectConfig.js @@ -40,11 +40,17 @@ export const loginInfo = { // 页面title & 退出登录跳转路径 loginPath: '/design/login' }, xadt: { - title: '西安地铁城市轨道交通实训平台', + title: '城市轨道交通实训平台', + loginTitle: '调度一部', + homeTitle: '调度一部', + browserTitle: '西安地铁调度一部城市轨道交通实训平台', loginPath: '/xadt/login' }, designxadt: { - title: '西安地铁城市轨道交通设计平台', + title: '城市轨道交通设计平台', + loginTitle: '调度一部', + homeTitle: '调度一部', + browserTitle: '西安地铁调度一部城市轨道交通设计平台', loginPath: '/designxadt/login' } }; diff --git a/src/views/login/index.vue b/src/views/login/index.vue index 9b16d630d..d1adb78e4 100644 --- a/src/views/login/index.vue +++ b/src/views/login/index.vue @@ -1,8 +1,11 @@