mirror of
https://github.com/xinnan-tech/xiaozhi-esp32-server.git
synced 2026-07-29 18:23:59 +08:00
update: 关闭设置框时保存配置, 阻止按钮事件冒泡, 调整配置获取方式
This commit is contained in:
@@ -58,10 +58,9 @@ export function saveConfig() {
|
||||
|
||||
// 获取配置值
|
||||
export function getConfig() {
|
||||
// 从DOM获取值
|
||||
const deviceMac = document.getElementById('deviceMac')?.value.trim() || '';
|
||||
const deviceName = document.getElementById('deviceName')?.value.trim() || '';
|
||||
const clientId = document.getElementById('clientId')?.value.trim() || '';
|
||||
const deviceMac = localStorage.getItem('xz_tester_deviceMac');
|
||||
const deviceName = localStorage.getItem('xz_tester_deviceName');
|
||||
const clientId = localStorage.getItem('xz_tester_clientId');
|
||||
|
||||
return {
|
||||
deviceId: deviceMac, // 使用MAC地址作为deviceId
|
||||
|
||||
Reference in New Issue
Block a user