Commit ae9e4f73 by haojie

没有音色的问题

parent d9eb9ee6
......@@ -41,6 +41,7 @@
</template>
<script setup lang="ts">
import { show_message } from '@/utils/tool';
import { ref, onBeforeMount, onBeforeUnmount, computed, watch } from 'vue';
const props = withDefaults(
defineProps<{
......@@ -167,7 +168,10 @@ const UpdateAudio = async () => {
const onStartPlay = async () => {
// 音频播放完后,重新播放
// if (playProgress.value === 100) audioRef.value.currentTime = 0;
if (!props.url) {
show_message('没有音频');
return;
}
await audioRef.value.play();
//
emit('startPlay', props.id);
......
......@@ -77,11 +77,12 @@ export const getTonesList = async (mustSuccess: boolean = true) => {
item.img = item.icon;
item.c_name = item.name;
item.c_categorie = item.extend?.voice;
item.audio_url = item.audio_url ? item.audio_url : '';
});
obj.tones = res.data.filter((item: any) => item.type == typeTones);
obj.soundColor = res.data.filter((item: any) => {
if (item.type == typeSoundColor) {
if (item.status != LIVE_AUDIT_STATUS.LIVE_AUDIT_STATUS_FINISH && mustSuccess) {
if ((!item.status || item.audit_status != LIVE_AUDIT_STATUS.LIVE_AUDIT_STATUS_FINISH) && mustSuccess) {
return;
}
return item;
......
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