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
+2
View File
@@ -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 () => {
<text>{{ loadingText || "加载中..." }}</text>
</view>
</view>
<DeviceChargingDialog />
</view>
</template>
+22
View File
@@ -0,0 +1,22 @@
<script setup>
import { storeToRefs } from "pinia";
import ModalDialog from "@/components/ModalDialog.vue";
import useStore from "@/store";
const chargingNotice =
"检测到智能弓箭已开始充电,为保护电池,设备即将自动关机。\n(注意:此时拔出充电线将会重启设备。)";
const store = useStore();
const { deviceChargingDialogVisible } = storeToRefs(store);
const { hideDeviceChargingDialog } = store;
</script>
<template>
<ModalDialog
:show="deviceChargingDialogVisible"
:content="chargingNotice"
:show-cancel="false"
confirm-text="我知道了"
:on-confirm="hideDeviceChargingDialog"
/>
</template>