|
|
@ -47,7 +47,7 @@ renderer.del = function (text) { |
|
|
|
}; |
|
|
|
|
|
|
|
// 定义自定义事件 |
|
|
|
const emit = defineEmits(["updateMessage", "sendMessage"]); |
|
|
|
const emit = defineEmits(["updateMessage", "sendMessage", "enableInput"]); |
|
|
|
|
|
|
|
// 音频播放方法 |
|
|
|
const playAudio = (url) => { |
|
|
@ -451,6 +451,7 @@ const createTypingEffect = (message, content, speed) => { |
|
|
|
content: "工作流返回出错,请稍后重试", |
|
|
|
}); |
|
|
|
chatStore.isLoading = false; |
|
|
|
emit('enableInput'); |
|
|
|
if (message.error == "2") { |
|
|
|
apiStatus.two.isError = true; |
|
|
|
} else if (message.error == "3") { |
|
|
@ -462,6 +463,7 @@ const createTypingEffect = (message, content, speed) => { |
|
|
|
if (message.end) { |
|
|
|
chatStore.getUserCount(); |
|
|
|
chatStore.isLoading = false; |
|
|
|
emit('enableInput'); |
|
|
|
} |
|
|
|
message.isTyping = false; |
|
|
|
nextTick(() => { |
|
|
@ -580,6 +582,7 @@ const createTypingEffect = (message, content, speed) => { |
|
|
|
content: "工作流返回出错,请稍后重试", |
|
|
|
}); |
|
|
|
chatStore.isLoading = false; |
|
|
|
emit('enableInput'); |
|
|
|
if (message.error == "2") { |
|
|
|
apiStatus.two.isError = true; |
|
|
|
} else if (message.error == "3") { |
|
|
@ -612,6 +615,7 @@ const createTypingEffect = (message, content, speed) => { |
|
|
|
content: "工作流返回出错,请稍后重试", |
|
|
|
}); |
|
|
|
chatStore.isLoading = false; |
|
|
|
emit('enableInput'); |
|
|
|
if (message.error == "2") { |
|
|
|
apiStatus.two.isError = true; |
|
|
|
} else if (message.error == "3") { |
|
|
@ -738,6 +742,7 @@ watch( |
|
|
|
}); |
|
|
|
|
|
|
|
chatStore.isLoading = false; |
|
|
|
emit('enableInput'); |
|
|
|
} |
|
|
|
} catch (e) { |
|
|
|
console.log(e, "意图识别失败"); |
|
|
@ -748,6 +753,7 @@ watch( |
|
|
|
content: "工作流返回出错,请稍后重试", |
|
|
|
}); |
|
|
|
chatStore.isLoading = false; |
|
|
|
emit('enableInput'); |
|
|
|
} |
|
|
|
|
|
|
|
if (flag) { |
|
|
@ -1572,6 +1578,7 @@ watch( |
|
|
|
content: "工作流返回出错,请稍后重试", |
|
|
|
}); |
|
|
|
chatStore.isLoading = false; |
|
|
|
emit('enableInput'); |
|
|
|
} |
|
|
|
} |
|
|
|
|
|
|
@ -1671,6 +1678,7 @@ watch( |
|
|
|
content: "工作流返回出错,请稍后重试", |
|
|
|
}); |
|
|
|
chatStore.isLoading = false; |
|
|
|
emit('enableInput'); |
|
|
|
} |
|
|
|
} |
|
|
|
} |
|
|
@ -1856,6 +1864,7 @@ watch( |
|
|
|
content: "工作流返回出错,请稍后重试1111", |
|
|
|
}); |
|
|
|
chatStore.isLoading = false; |
|
|
|
emit('enableInput'); |
|
|
|
} |
|
|
|
} |
|
|
|
} |
|
|
@ -1990,6 +1999,7 @@ watch( |
|
|
|
content: "工作流返回出错,请稍后重试", |
|
|
|
}); |
|
|
|
chatStore.isLoading = false; |
|
|
|
emit('enableInput'); |
|
|
|
} |
|
|
|
} |
|
|
|
} |
|
|
@ -2166,6 +2176,7 @@ watch( |
|
|
|
content: "数据缺失,请稍后重试", |
|
|
|
}); |
|
|
|
chatStore.isLoading = false; |
|
|
|
emit('enableInput'); |
|
|
|
} |
|
|
|
|
|
|
|
// 同时发起所有API调用 |
|
|
|