修改配置项目客户端登陆报错问题

This commit is contained in:
dong 2023-02-20 16:17:24 +08:00
parent 9a04a38ac4
commit 275e39b42b
2 changed files with 5 additions and 4 deletions

View File

@ -80,8 +80,9 @@ export default {
},
created() {
this.project = getSessionStorage('project');
if (this.project) {
document.querySelector("link[rel*='icon']").href = loginInfo[this.project].linkIcon || ProjectIcon[this.project];
const linkIcon = loginInfo[this.project] ? loginInfo[this.project].linkIcon : (ProjectIcon[this.project] || '');
if (this.project && linkIcon) {
document.querySelector("link[rel*='icon']").href = linkIcon;
}
},
mounted() {

View File

@ -72,10 +72,10 @@ export default {
return this.$store.state.app.dialogMessage;
},
companyInfo() {
return loginInfo[getSessionStorage('project')].bottomColumn;
return loginInfo[getSessionStorage('project')] ? loginInfo[getSessionStorage('project')].bottomColumn : '';
},
bottomIcon() {
return loginInfo[getSessionStorage('project')].bottomIcon;
return loginInfo[getSessionStorage('project')] ? loginInfo[getSessionStorage('project')].bottomIcon : '';
}
},
watch:{