前端逻辑调整

This commit is contained in:
zhangyue 2026-05-27 11:24:29 +08:00
parent 61d4e56851
commit 6baa7b7c91
1 changed files with 7 additions and 3 deletions

View File

@ -129,11 +129,15 @@
// //
addLog(topic, payload); addLog(topic, payload);
let initData = data.rw_prot;
if (!initData) {
initData = data.params;
}
if (data.rw_prot !== undefined) { if (initData) {
if (data.rw_prot.r_data !== undefined) { if (initData.r_data !== undefined) {
// Map // Map
const sourceMap = data.rw_prot.r_data.reduce((map, item) => { const sourceMap = initData.r_data.reduce((map, item) => {
map[item.name] = item.value; map[item.name] = item.value;
return map; return map;
}, {}); }, {});