update:语音优化

This commit is contained in:
2026-08-19 14:04:12 +08:00
parent 75cfcd66ee
commit bb224c9f29
13 changed files with 153 additions and 86 deletions
@@ -2,7 +2,11 @@
import { ref, watch, onMounted, onBeforeUnmount, computed } from "vue";
import audioManager from "@/audioManager";
import { MESSAGETYPESV2 } from "@/constants";
import { getDirectionText, getInvalidShotAudioKey } from "@/util";
import {
getDirectionText,
getInvalidShotAudioKey,
getInvalidShotText,
} from "@/util";
import Avatar from "@/components/Avatar.vue";
import useStore from "@/store";
@@ -238,7 +242,7 @@ async function onReceiveMessage(msg) {
audioManager.play("中场休息");
} else if (msg.type === MESSAGETYPESV2.InvalidShot) {
uni.showToast({
title: "距离不足,无效",
title: getInvalidShotText(msg.shootData),
icon: "none",
});
audioManager.play(getInvalidShotAudioKey(msg.shootData));