修改了一些东西
This commit is contained in:
@@ -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;
|
||||
|
||||
|
||||
Reference in New Issue
Block a user