添加设备在线离线处理
This commit is contained in:
@@ -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");
|
||||
}
|
||||
});
|
||||
|
||||
|
||||
Reference in New Issue
Block a user