From 85f74e4d892c0b324d492b368e007fcb6eaa0354 Mon Sep 17 00:00:00 2001 From: shaohuzhang1 Date: Wed, 2 Apr 2025 13:40:04 +0800 Subject: [PATCH] fix: After trying voice playback three times and sending an error message, an error message pops up --- .../component/operation-button/ChatOperationButton.vue | 9 ++++++--- 1 file changed, 6 insertions(+), 3 deletions(-) diff --git a/ui/src/components/ai-chat/component/operation-button/ChatOperationButton.vue b/ui/src/components/ai-chat/component/operation-button/ChatOperationButton.vue index b3c55dae8cd..4e2ee5dec3b 100644 --- a/ui/src/components/ai-chat/component/operation-button/ChatOperationButton.vue +++ b/ui/src/components/ai-chat/component/operation-button/ChatOperationButton.vue @@ -314,7 +314,9 @@ class AudioManage { .then(async (res: any) => { if (res.type === 'application/json') { const text = await res.text() - MsgError(text) + if (this.tryList[index] >= 3) { + MsgError(text) + } this.statusList[index] = AudioStatus.ERROR throw '' } @@ -375,8 +377,9 @@ class AudioManage { .then(async (res: any) => { if (res.type === 'application/json') { const text = await res.text() - MsgError(text) - + if (this.tryList[index] >= 3) { + MsgError(text) + } throw '' } // 假设我们有一个 MP3 文件的字节数组