[AI Generated]: refactor(*): 保活定时器与连接清理逻辑收口至 app.js,修复 null 安全与注释错误
- 新增 app.startKeepAlive/stopKeepAlive/cleanupConnection,bus 监听自动控制保活与断联清理 - Blue.stop() 收入 cleanupConnection,页面 onHide/onUnload 统一调用 - 修复 replaceNetwork.js seviceList 可能为 undefined 导致崩溃 - 修复 configureDevice_2.js device.mac 为 null 时崩溃 - 修复 replaceNetwork_1.js activeProtocol 无 null 检查及 wifiList 容错 - 修正 configureDevice_4.js 超时注释(3分钟→30秒)
This commit is contained in:
@@ -114,6 +114,10 @@ Component({
|
||||
|
||||
// 获取设备绑定的用户列表
|
||||
fetchUserList() {
|
||||
if (!app.globalData.ppScale.device.mac) {
|
||||
wx.showToast({ title: '设备 MAC 地址为空,请重新连接', icon: 'none' });
|
||||
return;
|
||||
}
|
||||
let sn = app.globalData.ppScale.device.mac.replace(/:/g, '');
|
||||
$.ajax("weighingScale/v2/select/user", { sn }, "GET", true, "正在获取用户列表...").then(res => {
|
||||
if (res.result && res.result.length) {
|
||||
|
||||
Reference in New Issue
Block a user