fix(系统设置): 修复logo显示问题

--bug=1021870 --user=郭雨琦
https://www.tapd.cn/55049933/bugtrace/bugs/view/1155049933001021870
This commit is contained in:
guoyuqi 2023-01-11 14:50:46 +08:00 committed by 刘瑞斌
parent 910f6a87ab
commit 87766e3919
1 changed files with 11 additions and 0 deletions

View File

@ -178,6 +178,9 @@ export default {
if (title) {
document.title = title;
}
if (response.data[0].paramValue) {
this.shortcutIcon();
}
})
})
@ -196,6 +199,7 @@ export default {
this.rules = this.getDefaultRules();
}
});
},
created: function () {
document.addEventListener("keydown", this.watchEnter);
@ -296,6 +300,13 @@ export default {
});
}
},
shortcutIcon() {
let link = document.querySelector("link[rel*='icon']") || document.createElement('link');
link.type = 'image/x-icon';
link.rel = 'shortcut icon';
link.href = '/display/file/logo';
document.getElementsByTagName('head')[0].appendChild(link);
},
redirectAuth(authId) {
if (authId === 'LDAP' || authId === 'LOCAL') {
return;