添加退出当前页面关闭声音
This commit is contained in:
@@ -67,7 +67,6 @@ const ringText = (ring) => {
|
||||
|
||||
<style scoped>
|
||||
.container {
|
||||
min-height: 150rpx;
|
||||
display: flex;
|
||||
flex-direction: column;
|
||||
justify-content: flex-end;
|
||||
|
||||
@@ -12,6 +12,7 @@ import Avatar from "@/components/Avatar.vue";
|
||||
import BowPower from "@/components/BowPower.vue";
|
||||
import TestDistance from "@/components/TestDistance.vue";
|
||||
import BubbleTip from "@/components/BubbleTip.vue";
|
||||
import audioManager from "@/audioManager";
|
||||
import { createPractiseAPI } from "@/apis";
|
||||
import { generateCanvasImage, wxShare, debounce } from "@/util";
|
||||
import { MESSAGETYPES } from "@/constants";
|
||||
@@ -104,6 +105,7 @@ onBeforeUnmount(() => {
|
||||
});
|
||||
uni.$off("socket-inbox", onReceiveMessage);
|
||||
uni.$off("share-image", onClickShare);
|
||||
audioManager.stopAll();
|
||||
});
|
||||
|
||||
const nextStep = async () => {
|
||||
|
||||
@@ -10,6 +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 audioManager from "@/audioManager";
|
||||
import { getCurrentGameAPI, laserCloseAPI } from "@/apis";
|
||||
import { isGameEnded } from "@/util";
|
||||
import { MESSAGETYPES } from "@/constants";
|
||||
@@ -167,6 +168,7 @@ onBeforeUnmount(() => {
|
||||
keepScreenOn: false,
|
||||
});
|
||||
uni.$off("socket-inbox", onReceiveMessage);
|
||||
audioManager.stopAll();
|
||||
});
|
||||
const refreshTimer = ref(null);
|
||||
onShow(async () => {
|
||||
|
||||
@@ -10,6 +10,7 @@ import Avatar from "@/components/Avatar.vue";
|
||||
import BowPower from "@/components/BowPower.vue";
|
||||
import TestDistance from "@/components/TestDistance.vue";
|
||||
import BubbleTip from "@/components/BubbleTip.vue";
|
||||
import audioManager from "@/audioManager";
|
||||
import { createPractiseAPI } from "@/apis";
|
||||
import { generateCanvasImage, wxShare, debounce } from "@/util";
|
||||
import { MESSAGETYPES, roundsName } from "@/constants";
|
||||
@@ -24,6 +25,7 @@ const currentRound = ref(0);
|
||||
const practiseResult = ref({});
|
||||
const practiseId = ref("");
|
||||
const showGuide = ref(false);
|
||||
const tips = ref("");
|
||||
|
||||
const onReady = async () => {
|
||||
const result = await createPractiseAPI(total);
|
||||
@@ -102,6 +104,7 @@ onBeforeUnmount(() => {
|
||||
});
|
||||
uni.$off("socket-inbox", onReceiveMessage);
|
||||
uni.$off("share-image", onClickShare);
|
||||
audioManager.stopAll();
|
||||
});
|
||||
</script>
|
||||
|
||||
@@ -119,7 +122,6 @@ onBeforeUnmount(() => {
|
||||
}轮`
|
||||
}`"
|
||||
:start="start"
|
||||
:total="120"
|
||||
/>
|
||||
<view class="user-row">
|
||||
<Avatar :src="user.avatar" :size="35" />
|
||||
|
||||
@@ -10,6 +10,7 @@ import Avatar from "@/components/Avatar.vue";
|
||||
import BowPower from "@/components/BowPower.vue";
|
||||
import TestDistance from "@/components/TestDistance.vue";
|
||||
import BubbleTip from "@/components/BubbleTip.vue";
|
||||
import audioManager from "@/audioManager";
|
||||
import { createPractiseAPI } from "@/apis";
|
||||
import { generateCanvasImage, wxShare, debounce } from "@/util";
|
||||
import { MESSAGETYPES } from "@/constants";
|
||||
@@ -95,6 +96,7 @@ onBeforeUnmount(() => {
|
||||
});
|
||||
uni.$off("socket-inbox", onReceiveMessage);
|
||||
uni.$off("share-image", onClickShare);
|
||||
audioManager.stopAll();
|
||||
});
|
||||
</script>
|
||||
|
||||
|
||||
@@ -297,6 +297,7 @@ onBeforeUnmount(() => {
|
||||
keepScreenOn: false,
|
||||
});
|
||||
uni.$off("socket-inbox", onReceiveMessage);
|
||||
audioManager.stopAll();
|
||||
});
|
||||
const refreshTimer = ref(null);
|
||||
onShow(async () => {
|
||||
|
||||
Reference in New Issue
Block a user