|
|
@ -1115,7 +1115,6 @@ watch( |
|
|
|
chatStore.messages.push(newVal[newVal.length - 1]); |
|
|
|
chatStore.currentUserIndex = chatStore.messages.length - 1; |
|
|
|
chatStore.inputUserIndex = chatStore.messages.length - 1; |
|
|
|
|
|
|
|
console.log( |
|
|
|
"消息列表已更新,最新消息:", |
|
|
|
chatStore.messages[chatStore.messages.length - 1], |
|
|
@ -1160,12 +1159,12 @@ watch( |
|
|
|
codeData.value.name |
|
|
|
); |
|
|
|
} |
|
|
|
for (let i = chatStore.messages.length - 1; i >= 0; --i) { |
|
|
|
if (chatStore.messages[i].sender == "user") { |
|
|
|
chatStore.messages[i].audioStatus = true; |
|
|
|
break; |
|
|
|
} |
|
|
|
} |
|
|
|
// for (let i = chatStore.messages.length - 1; i >= 0; --i) { |
|
|
|
// if (chatStore.messages[i].sender == "user") { |
|
|
|
// chatStore.messages[i].audioStatus = true; |
|
|
|
// break; |
|
|
|
// } |
|
|
|
// } |
|
|
|
chatStore.messages.push({ |
|
|
|
// class: "ing", |
|
|
|
// type: "ing", |
|
|
@ -1563,6 +1562,9 @@ watch( |
|
|
|
audioPreloadStatus.one.url |
|
|
|
); |
|
|
|
if (chatStore.currentUserIndex == chatStore.inputUserIndex) { |
|
|
|
chatStore.messages[ |
|
|
|
chatStore.inputUserIndex |
|
|
|
].audioStatus = true; |
|
|
|
addToAudioQueue(audioPreloadStatus.one.url, "API1-第一个"); |
|
|
|
} else { |
|
|
|
chatStore.messages[ |
|
|
@ -2470,6 +2472,7 @@ watch( |
|
|
|
}); |
|
|
|
chatStore.isLoading = false; |
|
|
|
chatStore.chatInput = false; |
|
|
|
chatStore.firstAPICall = false; |
|
|
|
emit("enableInput"); |
|
|
|
} |
|
|
|
} catch (e) { |
|
|
|