Commit e143800b authored by 陈冲's avatar 陈冲

fix: 修复game3 h5 音乐

parent d65da20b
...@@ -6,7 +6,7 @@ import { useGameSocket, joinSharedRoom, sendGameMessage, userJoinStatus, userTop ...@@ -6,7 +6,7 @@ import { useGameSocket, joinSharedRoom, sendGameMessage, userJoinStatus, userTop
import LoadingView from './views/LoadingView.vue' import LoadingView from './views/LoadingView.vue'
import PlayingView from './views/PlayingView.vue' import PlayingView from './views/PlayingView.vue'
import { $getWechat, $toast, $is_run_local } from '@/commons/utils.ts' import { $getWechat, $toast, $is_run_local } from '@/commons/utils.ts'
import { playGame6Music, stopGame6Music } from '@/commons/music'; import { playGame3Music, stopAllMusic } from '@/commons/music';
type GameView = 'loading' | 'playing' type GameView = 'loading' | 'playing'
type RankPlayer = { type RankPlayer = {
...@@ -199,9 +199,9 @@ const touchHandler = (mole: boolean) => { ...@@ -199,9 +199,9 @@ const touchHandler = (mole: boolean) => {
if (nextTick < 0) nextTick = 0 if (nextTick < 0) nextTick = 0
score.value = nextTick score.value = nextTick
if (mole) { if (mole) {
playGame6Music(1); playGame3Music(1);
} else { } else {
playGame6Music(2); playGame3Music(2);
} }
submitScore(false, nextTick) submitScore(false, nextTick)
} }
...@@ -302,7 +302,7 @@ onMounted(() => { ...@@ -302,7 +302,7 @@ onMounted(() => {
onBeforeUnmount(() => { onBeforeUnmount(() => {
_offSocketMessage.value?.() _offSocketMessage.value?.()
stopGame6Music() stopAllMusic()
if (guFrameTimer) { if (guFrameTimer) {
window.clearTimeout(guFrameTimer) window.clearTimeout(guFrameTimer)
} }
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment