Fix(云灵AI):[#5374]历史对话详情页-点击语音播放按钮,没有播放AI回答内容,原因是后端返回的数据conversationId、messageId有可能为空,需要兼容处理
This commit is contained in:
@@ -686,7 +686,7 @@ export const chatMixinsV2 = {
|
||||
return
|
||||
}
|
||||
this.isPlayAudio = false
|
||||
this.audioPlayId = item.conversationId
|
||||
this.audioPlayId = item.conversationId || item.messageId || item.parentMessageId
|
||||
const flag = 1
|
||||
if (flag === 1) {
|
||||
console.log(removeMarkdown(item.content).replace(/[\n\t\s]/g, ''))
|
||||
|
||||
@@ -115,7 +115,7 @@
|
||||
@click="ttsHandle(item)"
|
||||
>
|
||||
<image
|
||||
:src="webUrl + '/aiChat/' + ((audioPlayId === item.conversationId && isPlayAudio) ? 'audio-on' : 'audio-off') +'.png'"
|
||||
:src="webUrl + '/aiChat/' + (([item.conversationId, item.messageId, item.parentMessageId].includes(audioPlayId) && isPlayAudio) ? 'audio-on' : 'audio-off') +'.png'"
|
||||
class="icon"
|
||||
mode="widthFix"
|
||||
/>
|
||||
|
||||
@@ -289,7 +289,7 @@
|
||||
@click="ttsHandle(item)"
|
||||
>
|
||||
<image
|
||||
:src="webUrl + '/aiChat/' + ((audioPlayId === item.conversationId && isPlayAudio) ? 'audio-on' : 'audio-off') +'.png'"
|
||||
:src="webUrl + '/aiChat/' + (([item.conversationId, item.messageId, item.parentMessageId].includes(audioPlayId) && isPlayAudio) ? 'audio-on' : 'audio-off') +'.png'"
|
||||
class="icon"
|
||||
mode="widthFix"
|
||||
/>
|
||||
|
||||
Reference in New Issue
Block a user