调整西安地铁登录页面

This commit is contained in:
fan 2020-04-21 15:47:25 +08:00
parent dcf7b951ab
commit d44faf55ea
4 changed files with 26 additions and 7 deletions

View File

@ -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;

View File

@ -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();
});

View File

@ -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'
}
};

View File

@ -1,8 +1,11 @@
<template>
<div class="login-container" :style="{'background-image': 'url('+bgImg+')'}">
<div v-if="loginTitle" class="left-logo-box">
<img class="logo" :src="logoImg" style="width: 60px">
<span>{{ loginTitle }}</span>
</div>
<div v-if="isProject" class="text-box">
<img v-if="project.endsWith('hyd')" class="logo" :src="logoImg" style="width: 140px">
<img v-else class="logo" :src="logoImg" style="width: 80px">
<img v-if="!loginTitle" class="logo" :src="logoImg" style="width: 80px">
<span>{{ title }}</span>
</div>
<div class="language_box">
@ -162,6 +165,9 @@ export default {
project() {
return this.$route.path.split('/')[1];
},
loginTitle () {
return loginInfo[this.$route.path.split('/')[1]].loginTitle;
},
title() {
return loginInfo[this.$route.path.split('/')[1]].title;
},
@ -198,7 +204,7 @@ export default {
}
},
mounted() {
document.title = loginInfo[this.project].title;
document.title = loginInfo[this.project].browserTitle || loginInfo[this.project].title;
this.loginRefresh();
},
methods: {
@ -421,6 +427,13 @@ export default {
font-size: 40px;
font-weight: bold;
}
.left-logo-box{
position: absolute;
top: 2%;
font-size: 28px;
font-weight: bold;
left: 2%;
}
.logo{
vertical-align: middle;
}