From 36801e92661f9d2ac34dcd38badb5fd5b6b61fb1 Mon Sep 17 00:00:00 2001 From: hubian <908234780@qq.com> Date: Tue, 28 Apr 2026 12:48:51 +0800 Subject: [PATCH] =?UTF-8?q?feat:=20=E6=88=91=E7=9A=84=E9=A1=B5=E9=9D=A2?= =?UTF-8?q?=E5=92=8C=E5=85=B3=E4=BA=8E=E9=A1=B5=E9=9D=A2=E7=BB=91=E5=AE=9A?= =?UTF-8?q?=E5=90=8E=E5=8F=B0=E7=B3=BB=E7=BB=9F=E9=85=8D=E7=BD=AE?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- www/app.js | 27 +++++++++++++++++++++++++-- 1 file changed, 25 insertions(+), 2 deletions(-) diff --git a/www/app.js b/www/app.js index 4ac8069..6440363 100644 --- a/www/app.js +++ b/www/app.js @@ -124,6 +124,19 @@ async function loadBackendConfig() { // 不加载默认启用的工具,所有工具默认未启用 + // 将后台系统配置赋值到 CONFIG + if (backendConfig.system) { + CONFIG.system = backendConfig.system; + } + + // 将后台 LLM 配置赋值到 CONFIG + if (backendConfig.llm) { + CONFIG.apiUrl = backendConfig.llm.api_url; + CONFIG.apiKey = backendConfig.llm.api_key; + CONFIG.model = backendConfig.llm.model; + CONFIG.maxTokens = backendConfig.llm.max_tokens || 2048; + } + updateAgentsDisplay(); console.log('后台配置已加载', backendConfig); } catch (e) { @@ -2613,7 +2626,12 @@ function showAboutPage() { const privacyPolicyBtn = document.getElementById('privacyPolicyBtn'); if (privacyPolicyBtn) { privacyPolicyBtn.addEventListener('click', () => { - showToast('隐私政策页面待完善'); + const privacyUrl = CONFIG?.system?.privacyPolicyUrl; + if (privacyUrl) { + window.open(privacyUrl, '_blank'); + } else { + showToast('隐私政策链接未配置'); + } }); } @@ -2621,7 +2639,12 @@ function showAboutPage() { const userAgreementBtn = document.getElementById('userAgreementBtn'); if (userAgreementBtn) { userAgreementBtn.addEventListener('click', () => { - showToast('用户协议页面待完善'); + const agreementUrl = CONFIG?.system?.userAgreementUrl; + if (agreementUrl) { + window.open(agreementUrl, '_blank'); + } else { + showToast('用户协议链接未配置'); + } }); } }