From 281df5b39778895b4fa91979116527d6fdfcbc39 Mon Sep 17 00:00:00 2001 From: CaptainB Date: Fri, 20 Sep 2024 10:46:27 +0800 Subject: [PATCH] =?UTF-8?q?fix:=20=E5=A4=84=E7=90=86=E8=B0=83=E8=AF=95?= =?UTF-8?q?=E6=97=B6=E8=8E=B7=E5=8F=96=E4=B8=8D=E5=88=B0appid=E7=9A=84?= =?UTF-8?q?=E9=97=AE=E9=A2=98?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- ui/src/components/ai-chat/OperationButton.vue | 9 ++++++++- 1 file changed, 8 insertions(+), 1 deletion(-) diff --git a/ui/src/components/ai-chat/OperationButton.vue b/ui/src/components/ai-chat/OperationButton.vue index 08b48a409..1fec26d1a 100644 --- a/ui/src/components/ai-chat/OperationButton.vue +++ b/ui/src/components/ai-chat/OperationButton.vue @@ -81,6 +81,13 @@ import { ref } from 'vue' import { copyClick } from '@/utils/clipboard' import applicationApi from '@/api/application' import { datetimeFormat } from '@/utils/time' +import { useRoute } from 'vue-router' + +const route = useRoute() +const { + params: { id }, +} = route as any + const props = defineProps({ data: { type: Object, @@ -162,7 +169,7 @@ const playAnswerText = (text: string) => { return } applicationApi - .postTextToSpeech(props.applicationId as string, { text: text }, loading) + .postTextToSpeech(id || props.applicationId as string, { text: text }, loading) .then((res: any) => { // 假设我们有一个 MP3 文件的字节数组 // 创建 Blob 对象