From 2628a17b3fddea426bb8a7f49c348f4a5599031b Mon Sep 17 00:00:00 2001
From: zhangyibo95 <690096405@qq.com>
Date: Fri, 14 Aug 2026 17:59:11 +0800
Subject: [PATCH] =?UTF-8?q?update:=20=E6=96=B0=E5=A2=9E=E8=AE=BE=E5=A4=87?=
=?UTF-8?q?=E5=85=85=E7=94=B5=E9=80=9A=E7=9F=A5?=
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
---
src/App.vue | 7 ++++++
src/components/Container.vue | 2 ++
src/components/DeviceChargingDialog.vue | 22 +++++++++++++++++++
src/constants.js | 1 +
src/pages/battle-result.vue | 2 ++
src/pages/device-intro.vue | 2 ++
src/pages/org-bind.vue | 2 ++
src/pages/point-book-detail-share.vue | 2 ++
src/pages/rank-list.vue | 2 ++
.../team-battle/components/Container.vue | 2 ++
src/pages/training/practise-one.vue | 1 -
src/store.js | 8 +++++++
src/websocket.js | 2 ++
13 files changed, 54 insertions(+), 1 deletion(-)
create mode 100644 src/components/DeviceChargingDialog.vue
diff --git a/src/App.vue b/src/App.vue
index 1b364ec..4e6d0d8 100644
--- a/src/App.vue
+++ b/src/App.vue
@@ -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);
}
diff --git a/src/components/Container.vue b/src/components/Container.vue
index 3b6e60f..9df69a2 100644
--- a/src/components/Container.vue
+++ b/src/components/Container.vue
@@ -5,6 +5,7 @@ import AppBackground from "@/components/AppBackground.vue";
import Header from "@/components/Header.vue";
import ScreenHint from "@/components/ScreenHint.vue";
import BackToGame from "@/components/BackToGame.vue";
+import DeviceChargingDialog from "@/components/DeviceChargingDialog.vue";
import {laserAimAPI, getBattleAPI, matchGameAPI} from "@/apis";
import { capsuleHeight, debounce } from "@/util";
import { returnToBattle } from "@/utils/matchReturn";
@@ -226,6 +227,7 @@ const goCalibration = async () => {
{{ loadingText || "加载中..." }}
+
diff --git a/src/components/DeviceChargingDialog.vue b/src/components/DeviceChargingDialog.vue
new file mode 100644
index 0000000..b633deb
--- /dev/null
+++ b/src/components/DeviceChargingDialog.vue
@@ -0,0 +1,22 @@
+
+
+
+
+
diff --git a/src/constants.js b/src/constants.js
index 7822bcd..492f68d 100644
--- a/src/constants.js
+++ b/src/constants.js
@@ -29,6 +29,7 @@ export const MESSAGETYPES = {
DeviceOnline: 4168086626,
DeviceOffline: 4168086627,
SomeoneIsReady: 4168086628,
+ DeviceCharging: 4168086631, // 设备充电中
};
export const MESSAGETYPESV2 = {
diff --git a/src/pages/battle-result.vue b/src/pages/battle-result.vue
index 275b298..884b1fc 100644
--- a/src/pages/battle-result.vue
+++ b/src/pages/battle-result.vue
@@ -3,6 +3,7 @@ import { ref, computed, onMounted } from "vue";
import { onLoad } from "@dcloudio/uni-app";
import Avatar from "@/components/Avatar.vue";
import UserUpgrade from "@/components/UserUpgrade.vue";
+import DeviceChargingDialog from "@/components/DeviceChargingDialog.vue";
import { getBattleAPI } from "@/apis";
import { topThreeColors, getBattleResultTips } from "@/constants";
import audioManager from "@/audioManager";
@@ -287,6 +288,7 @@ const checkBowData = () => {
返回
+
diff --git a/src/pages/device-intro.vue b/src/pages/device-intro.vue
index 2af5013..f780e14 100644
--- a/src/pages/device-intro.vue
+++ b/src/pages/device-intro.vue
@@ -1,6 +1,7 @@