在比赛开始时关闭激光
This commit is contained in:
@@ -1,6 +1,5 @@
|
||||
<script setup>
|
||||
import { ref, watch, onMounted } from "vue";
|
||||
import BowPower from "@/components/BowPower.vue";
|
||||
import StartCountdown from "@/components/StartCountdown.vue";
|
||||
import { simulShootAPI } from "@/apis";
|
||||
import useStore from "@/store";
|
||||
@@ -114,7 +113,6 @@ onMounted(() => {
|
||||
"/" +
|
||||
totalRound
|
||||
}}</text>
|
||||
<BowPower />
|
||||
</view>
|
||||
<view class="target">
|
||||
<view v-if="stop" class="stop-sign">中场休息</view>
|
||||
|
||||
@@ -10,7 +10,7 @@ import SButton from "@/components/SButton.vue";
|
||||
import Avatar from "@/components/Avatar.vue";
|
||||
import ScreenHint from "@/components/ScreenHint.vue";
|
||||
import TestDistance from "@/components/TestDistance.vue";
|
||||
import { getCurrentGameAPI } from "@/apis";
|
||||
import { getCurrentGameAPI, laserCloseAPI } from "@/apis";
|
||||
import { isGameEnded } from "@/util";
|
||||
import { MESSAGETYPES } from "@/constants";
|
||||
import useStore from "@/store";
|
||||
@@ -152,11 +152,12 @@ async function onReceiveMessage(messages = []) {
|
||||
const onBack = () => {
|
||||
uni.$showHint(2);
|
||||
};
|
||||
onMounted(() => {
|
||||
onMounted(async () => {
|
||||
uni.setKeepScreenOn({
|
||||
keepScreenOn: true,
|
||||
});
|
||||
uni.$on("socket-inbox", onReceiveMessage);
|
||||
await laserCloseAPI();
|
||||
});
|
||||
onBeforeUnmount(() => {
|
||||
uni.setKeepScreenOn({
|
||||
|
||||
@@ -13,7 +13,7 @@ import RoundEndTip from "@/components/RoundEndTip.vue";
|
||||
import TestDistance from "@/components/TestDistance.vue";
|
||||
import TeamAvatars from "@/components/TeamAvatars.vue";
|
||||
import ShootProgress2 from "@/components/ShootProgress2.vue";
|
||||
import { getCurrentGameAPI } from "@/apis";
|
||||
import { getCurrentGameAPI, laserCloseAPI } from "@/apis";
|
||||
import { isGameEnded } from "@/util";
|
||||
import { MESSAGETYPES, roundsName } from "@/constants";
|
||||
import audioManager from "@/audioManager";
|
||||
@@ -281,11 +281,12 @@ onLoad(async (options) => {
|
||||
}
|
||||
}
|
||||
});
|
||||
onMounted(() => {
|
||||
onMounted(async () => {
|
||||
uni.setKeepScreenOn({
|
||||
keepScreenOn: true,
|
||||
});
|
||||
uni.$on("socket-inbox", onReceiveMessage);
|
||||
await laserCloseAPI();
|
||||
});
|
||||
onBeforeUnmount(() => {
|
||||
uni.setKeepScreenOn({
|
||||
|
||||
Reference in New Issue
Block a user