feat(设备管理): 重构设备数据管理逻辑,统一使用deviceData对象

- 将分散的设备信息存储改为统一的deviceData对象
- 更新相关API请求参数传递方式
- 增加设备类型支持,动态构建API路径
- 修复设备信息初始化问题,确保数据一致性
This commit is contained in:
2025-06-25 12:43:31 +08:00
parent ea5ed7c9ce
commit fec4276cc8
7 changed files with 45 additions and 27 deletions

View File

@@ -124,7 +124,10 @@ module.exports = {
getDevicecode: function (e, a) {
o = e, n("https://t-jm.v0750.com/v2/miniprogram/identify/reload", a, !0).then(function (e) {
var a = e.data;
console.log("onshow获取到的数据", a), o.globalData.devicecode = a.devicecode || o.globalData.devicecode;
if (e.code == 200) {
o.globalData.deviceData = a || {};
o.globalData.devicecode = a.devicecode || '';
}
});
}
};