From d1ddd340c0d8b6d12a94736eb37aa3dd1e1f7e21 Mon Sep 17 00:00:00 2001 From: hubian <908234780@qq.com> Date: Mon, 27 Apr 2026 15:41:46 +0800 Subject: [PATCH] =?UTF-8?q?fix:=20API=E5=9C=B0=E5=9D=80=E6=94=B9=E4=B8=BA?= =?UTF-8?q?=E7=9B=B8=E5=AF=B9=E8=B7=AF=E5=BE=84=EF=BC=8C=E9=80=82=E5=BA=94?= =?UTF-8?q?=E4=B8=8D=E5=90=8C=E8=AE=BE=E5=A4=87=E8=AE=BF=E9=97=AE?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- www/app.js | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/www/app.js b/www/app.js index 737cd55..77c1e0d 100644 --- a/www/app.js +++ b/www/app.js @@ -78,8 +78,8 @@ function getTodayDate() { // 从后台API加载配置 async function loadBackendConfig() { try { - // 后台服务地址 - const API_BASE = 'http://localhost:19021'; + // 使用相对路径,自动适应当前域名 + const API_BASE = window.location.origin; const res = await fetch(`${API_BASE}/api/config`); backendConfig = await res.json();