添加设备在线离线处理

This commit is contained in:
kron
2025-12-31 13:39:16 +08:00
parent 25f51ad53a
commit af852d9b59
8 changed files with 104 additions and 57 deletions

View File

@@ -79,6 +79,10 @@ function createWebSocket(token, onMessage) {
uni.setStorageSync("latestRank", msg.lvl);
} else if (msg.constructor === MESSAGETYPES.LvlUpdate) {
uni.setStorageSync("latestLvl", msg.lvl);
} else if (msg.constructor === MESSAGETYPES.DeviceOnline) {
uni.$emit("update-online");
} else if (msg.constructor === MESSAGETYPES.DeviceOffline) {
uni.$emit("update-online");
}
});