diff --git a/src/layout/components/footer.vue b/src/layout/components/footer.vue index a26f927..4277aa5 100644 --- a/src/layout/components/footer.vue +++ b/src/layout/components/footer.vue @@ -46,6 +46,9 @@ const store = useStore(); const dynamicContentRef = ref(); const dynamicContent = computed(() => { + if (store.state.setting?.config?.custom_code) { + return store.state.setting.config.custom_code; + } if (store.state.setting?.custom_code) { return store.state.setting.custom_code; } diff --git a/src/store/index.js b/src/store/index.js index 5ee70e5..0824336 100644 --- a/src/store/index.js +++ b/src/store/index.js @@ -118,7 +118,7 @@ const store = createStore({ commit('SET_SETTING', res); // 如果自定义配置没有设置title,使用站点名称 if (!window.$$nazhuaConfig.title) { - config.nazhua.title = res.site_name; + config.nazhua.title = res.config?.site_name || res.site_name; if (route?.name === 'Home' || !route) { document.title = config.nazhua.title; } diff --git a/src/utils/load-nezha-v1-config.js b/src/utils/load-nezha-v1-config.js index 8771a83..ef2d728 100644 --- a/src/utils/load-nezha-v1-config.js +++ b/src/utils/load-nezha-v1-config.js @@ -26,7 +26,8 @@ export const loadServerGroup = async () => request({ /** * 加载网站配置 * - * 暂时只使用site_name + * 暂时只使用site_name\custom_code + * 哪吒v1.4.9之后,上面的参数调整至data.config */ export const loadSetting = async () => request({ url: config.nazhua.v1ApiSettingPath,