update: 新增设备充电通知

This commit is contained in:
2026-08-14 17:59:11 +08:00
parent e7f073ed7c
commit 2628a17b3f
13 changed files with 54 additions and 1 deletions
+7
View File
@@ -28,6 +28,7 @@
const {
updateUser,
updateOnline,
showDeviceChargingDialog,
clearSessionState,
clearDevice
} = store;
@@ -82,6 +83,10 @@
uni.setStorageSync("calibration", false);
}
function onDeviceCharging() {
showDeviceChargingDialog();
}
function onDeviceShoot() {
// audioManager.play("射箭声音")
}
@@ -119,6 +124,7 @@
uni.$on("update-online", emitUpdateOnline);
uni.$on("session-kicked-out", onSessionKickedOut);
uni.$on("device-bind-invalid", onDeviceBindInvalid);
uni.$on("device-charging", onDeviceCharging);
if (typeof uni.offNetworkStatusChange === "function") {
uni.offNetworkStatusChange(onNetworkStatusChange);
}
@@ -144,6 +150,7 @@
uni.$off("update-online", emitUpdateOnline);
uni.$off("session-kicked-out", onSessionKickedOut);
uni.$off("device-bind-invalid", onDeviceBindInvalid);
uni.$off("device-charging", onDeviceCharging);
if (typeof uni.offNetworkStatusChange === "function") {
uni.offNetworkStatusChange(onNetworkStatusChange);
}