代码调整

This commit is contained in:
dong 2022-10-12 17:32:22 +08:00
parent b4085c609d
commit f03da32e21
3 changed files with 7 additions and 4 deletions

View File

@ -24,7 +24,6 @@ export default {
// this.logoImg = loginInfo[project].titleIcon || ProjectIcon[project];
// this.navigationLogoWidth = loginInfo[project].navigationLogoWidth;
// this.navigationMarginLeft = loginInfo[project].navigationMarginLeft;
console.log('🚀 ~ file: Title.vue ~ line 28 ~ mounted ~ projectConfig', this.$store.state.projectConfig);
this.systemTitle = this.$store.state.projectConfig.homeTitle;
this.logoImg = this.$store.state.projectConfig.loginProLogo;
this.navigationLogoWidth = this.$store.state.projectConfig.homeProLogoWidth + 'px';

View File

@ -114,7 +114,7 @@ router.beforeEach( async (to, from, next) => {
// }
const response = await getFrontProjectConfigByLogin(project);
if (response.data) {
const {browserTitle, loginProLogo, baseApiUrl, baseSite, caseShow, ossUrl} = response.data.viewSetting;
const {browserTitle, loginProLogo, baseApiUrl, baseSite, caseShow, ossUrl, homeTitle, homeProLogoWidth} = response.data.viewSetting;
if (!store.state.user.baseUrl && project) {
const urlData = handlerUrl();
store.dispatch('setBaseUrl', baseApiUrl || urlData.BASE_API);
@ -123,8 +123,12 @@ router.beforeEach( async (to, from, next) => {
subscribe();
}
document.title = browserTitle;
document.querySelector("link[rel*='icon']").href = loginProLogo ? '/oss-rtss/logo/' + loginProLogo : '';
const url = loginProLogo ? store.state.user.ossUrl + '/logo/' + loginProLogo : '';
document.querySelector("link[rel*='icon']").href = url;
store.commit('setCaseShow', caseShow);
store.dispatch('setHomeProLogoWidth', homeProLogoWidth);
store.dispatch('setLoginProLogo', url);
store.dispatch('setHomeTitle', homeTitle);
NProgress.start();
const loginPath = getRouteInfo(to, response.data.markKey);
const token = to.query.token;

View File

@ -110,7 +110,7 @@ const permission = {
if (route.children && route.children.length == 0) {
route.hidden = true;
}
if (route.path == '/case') {
if (route.path == '/case') { // 案例菜单是否显示
route.hidden = !rootState.projectConfig.caseShow;
}
});