|
|
@ -256,7 +256,8 @@ const toggleVoiceForUser = (index) => { |
|
|
!chatStore.messages[index].audioArray[0] || |
|
|
!chatStore.messages[index].audioArray[0] || |
|
|
!chatStore.messages[index].audioArray[1] || |
|
|
!chatStore.messages[index].audioArray[1] || |
|
|
!chatStore.messages[index].audioArray[2] || |
|
|
!chatStore.messages[index].audioArray[2] || |
|
|
!chatStore.messages[index].audioArray[3] |
|
|
|
|
|
|
|
|
!chatStore.messages[index].audioArray[3] || |
|
|
|
|
|
!chatStore.messages[index].audioArray[4] |
|
|
) { |
|
|
) { |
|
|
return; |
|
|
return; |
|
|
} |
|
|
} |
|
|
@ -300,6 +301,10 @@ const toggleVoiceForUser = (index) => { |
|
|
audioPreloadStatus.four.loaded = true; |
|
|
audioPreloadStatus.four.loaded = true; |
|
|
audioPreloadStatus.four.url = chatStore.messages[index].audioArray[3]; |
|
|
audioPreloadStatus.four.url = chatStore.messages[index].audioArray[3]; |
|
|
} |
|
|
} |
|
|
|
|
|
if (chatStore.messages[index].audioArray[4]) { |
|
|
|
|
|
audioPreloadStatus.five.loaded = true; |
|
|
|
|
|
audioPreloadStatus.five.url = chatStore.messages[index].audioArray[4]; |
|
|
|
|
|
} |
|
|
chatStore.currentUserIndex = index; |
|
|
chatStore.currentUserIndex = index; |
|
|
audioQueue.value = []; |
|
|
audioQueue.value = []; |
|
|
isPlayingAudio.value = false; |
|
|
isPlayingAudio.value = false; |
|
|
@ -311,6 +316,7 @@ const toggleVoiceForUser = (index) => { |
|
|
addToAudioQueue(chatStore.messages[index].audioArray[1], "API2-第二个"); |
|
|
addToAudioQueue(chatStore.messages[index].audioArray[1], "API2-第二个"); |
|
|
addToAudioQueue(chatStore.messages[index].audioArray[2], "API3-第三个"); |
|
|
addToAudioQueue(chatStore.messages[index].audioArray[2], "API3-第三个"); |
|
|
addToAudioQueue(chatStore.messages[index].audioArray[3], "API4-第四个"); |
|
|
addToAudioQueue(chatStore.messages[index].audioArray[3], "API4-第四个"); |
|
|
|
|
|
addToAudioQueue(chatStore.messages[index].audioArray[4], "API5-第五个"); |
|
|
|
|
|
|
|
|
if (!audioStore.isVoiceEnabled) { |
|
|
if (!audioStore.isVoiceEnabled) { |
|
|
audioStore.toggleVoice(); |
|
|
audioStore.toggleVoice(); |
|
|
@ -870,8 +876,10 @@ const processTypingQueue = async () => { |
|
|
|
|
|
|
|
|
while (typingQueue.value.length > 0) { |
|
|
while (typingQueue.value.length > 0) { |
|
|
const task = typingQueue.value.shift(); |
|
|
const task = typingQueue.value.shift(); |
|
|
|
|
|
if (chatStore.allowTyping) { |
|
|
await createTypingEffect(task.message, task.content, task.speed); |
|
|
await createTypingEffect(task.message, task.content, task.speed); |
|
|
} |
|
|
} |
|
|
|
|
|
} |
|
|
|
|
|
|
|
|
isTypingInProgress.value = false; |
|
|
isTypingInProgress.value = false; |
|
|
}; |
|
|
}; |
|
|
@ -1065,6 +1073,7 @@ watch( |
|
|
|
|
|
|
|
|
// 第一阶段,意图识别 |
|
|
// 第一阶段,意图识别 |
|
|
try { |
|
|
try { |
|
|
|
|
|
chatStore.allowTyping = true; |
|
|
// 调用工作流获取回复 |
|
|
// 调用工作流获取回复 |
|
|
const result = await deepNineFirstAPI(params1); |
|
|
const result = await deepNineFirstAPI(params1); |
|
|
codeData.value = result.data; |
|
|
codeData.value = result.data; |
|
|
@ -1122,7 +1131,7 @@ watch( |
|
|
console.log(AIcontent, "AIcontent"); |
|
|
console.log(AIcontent, "AIcontent"); |
|
|
|
|
|
|
|
|
if (result.code == 406) { |
|
|
if (result.code == 406) { |
|
|
AIcontent.value = `<p>尊敬的用户您好,您当前的“深度九大模型专属Token”数量为0,无法进行股票查询,可联系客服团队进行充值,感谢您的理解与支持</p>`; |
|
|
|
|
|
|
|
|
AIcontent.value = `<p>尊敬的用户您好,您当前的“深度九大模型专属Token”余额不足,无法进行股票查询,可联系客服团队进行充值,感谢您的理解与支持</p>`; |
|
|
} |
|
|
} |
|
|
|
|
|
|
|
|
const aiMsg = { |
|
|
const aiMsg = { |
|
|
@ -1956,6 +1965,7 @@ watch( |
|
|
// 3. 停止打字机效果 |
|
|
// 3. 停止打字机效果 |
|
|
typingQueue.value = []; |
|
|
typingQueue.value = []; |
|
|
isTypingInProgress.value = false; |
|
|
isTypingInProgress.value = false; |
|
|
|
|
|
chatStore.allowTyping = false; |
|
|
|
|
|
|
|
|
// 4. 重置加载状态 |
|
|
// 4. 重置加载状态 |
|
|
homepageChatStore.isLoading = false; |
|
|
homepageChatStore.isLoading = false; |
|
|
|