From 0fe3f876a872fd3a92389e3c358673dc692613ad Mon Sep 17 00:00:00 2001 From: yiqiu Date: Thu, 19 Mar 2026 19:09:37 +0800 Subject: [PATCH] =?UTF-8?q?fix:=20Logo=20API=20=E6=94=B9=E7=94=A8=E6=AD=A3?= =?UTF-8?q?=E7=A1=AE=E7=9A=84=E5=89=8D=E5=8F=B0=E8=B7=AF=E7=94=B1=20/conso?= =?UTF-8?q?le/v1/theme/config?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit 原路径 config.json 被 ThinkPHP 路由拦截返回 404 改用插件前台 API 路由,支持 res.data 嵌套解析 --- clientarea/hgcloud/footer.php | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/clientarea/hgcloud/footer.php b/clientarea/hgcloud/footer.php index cf910e6..08eda0f 100644 --- a/clientarea/hgcloud/footer.php +++ b/clientarea/hgcloud/footer.php @@ -47,11 +47,12 @@ var logoEl = document.getElementById('siteLogo'); if (!logoEl) return; var xhr = new XMLHttpRequest(); - xhr.open('GET', '/web/BlackFruit-web/plugins/addon/theme_configurator/config.json', true); + xhr.open('GET', '/console/v1/theme/config', true); xhr.onload = function() { if (xhr.status === 200) { try { - var cfg = JSON.parse(xhr.responseText); + var res = JSON.parse(xhr.responseText); + var cfg = res.data || res; var logoUrl = cfg.site_config && cfg.site_config.official_website_logo; if (logoUrl) logoEl.src = logoUrl; } catch(e) {}