代码调整
This commit is contained in:
parent
b4085c609d
commit
f03da32e21
@ -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';
|
||||
|
@ -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;
|
||||
|
@ -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;
|
||||
}
|
||||
});
|
||||
|
Loading…
Reference in New Issue
Block a user