From 5991fa768c82fd3f9dedb280c7b1017f1d281e4c Mon Sep 17 00:00:00 2001 From: xiaoou Date: Fri, 10 Jul 2026 14:18:00 +0800 Subject: [PATCH] =?UTF-8?q?debug:=20loadDevices=20=E5=8A=A0=20token=20?= =?UTF-8?q?=E7=A9=BA=E5=80=BC=E6=A3=80=E6=B5=8B?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- welcome.html | 7 ++----- 1 file changed, 2 insertions(+), 5 deletions(-) diff --git a/welcome.html b/welcome.html index 6964c71..04a8a2e 100644 --- a/welcome.html +++ b/welcome.html @@ -242,12 +242,9 @@ async function createUser() { async function loadDevices() { document.getElementById('sys-status').textContent = '运行中'; - // 实体中文名映射 - var names = { - 'zone.home': '家庭区域', - 'person.admin': '管理员', - }; + var names = { 'zone.home': '家庭区域', 'person.admin': '管理员' }; try { + if (!token) { document.getElementById('sys-status').textContent = '未登录 (无token)'; return; } var r = await api('GET', '/api/states'); if (!r.ok) throw new Error('HTTP ' + r.status + ' ' + r.statusText); var states = await r.json();