mirror of
https://github.com/hi2shark/nazhua.git
synced 2026-01-12 15:20:43 +08:00
💥 兼容setting接口的新版本,影响内容site_name与custom_code
This commit is contained in:
parent
718b0138b0
commit
963c06dfce
@ -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;
|
||||
}
|
||||
|
||||
@ -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;
|
||||
}
|
||||
|
||||
@ -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,
|
||||
|
||||
Loading…
Reference in New Issue
Block a user