修改了一些东西

This commit is contained in:
2026-07-10 11:33:37 +08:00
parent fa2457ce7f
commit d2809c4d6d
9 changed files with 166 additions and 50 deletions
+5 -1
View File
@@ -191,7 +191,11 @@
const formatIcCardEventUnified = (ev) => {
const type = String(ev?.type || '').toLowerCase();
const action = String(ev?.action || '').toLowerCase();
const deviceId = ev?.device || ev?.device_id || ev?.["设备编号"] || ev?.["机器ID"] || '---';
let deviceId = ev?.device || ev?.device_id || ev?.["设备编号"] || ev?.["机器ID"] || '---';
if (/^\d+$/.test(deviceId)) deviceId = 'ticket_machine';
if (deviceId === 'ticket_machine') deviceId = '售票机';
if (deviceId === 'gate') deviceId = '闸机';
if (deviceId === 'refill_machine') deviceId = '充值机';
const timeStr = formatTime(ev?.ts);
const balance = ev?.balance ?? ev?.["余额"] ?? 0;