|
|
@ -195,7 +195,7 @@ const chatStore = useChatStore(); |
|
|
|
// 处理refuse数据的函数 |
|
|
|
function processRefuseMessage(refuseData) { |
|
|
|
if (!refuseData) return '未知错误'; |
|
|
|
|
|
|
|
|
|
|
|
// 如果refuse数据包含Markdown格式,进行转换 |
|
|
|
try { |
|
|
|
// 配置marked选项 |
|
|
@ -207,10 +207,10 @@ function processRefuseMessage(refuseData) { |
|
|
|
smartypants: true, // 智能标点符号 |
|
|
|
xhtml: false, // 不使用 XHTML 输出 |
|
|
|
}); |
|
|
|
|
|
|
|
|
|
|
|
// 将Markdown转换为HTML |
|
|
|
const htmlContent = marked(refuseData); |
|
|
|
|
|
|
|
|
|
|
|
// 移除HTML标签,只保留纯文本用于ElMessage显示 |
|
|
|
const tempDiv = document.createElement('div'); |
|
|
|
tempDiv.innerHTML = htmlContent; |
|
|
@ -389,7 +389,7 @@ watch(currentStock, (newStock) => { |
|
|
|
|
|
|
|
nextTick(() => { |
|
|
|
renderCharts(newStock.apiData); |
|
|
|
console.log('0000000000000000000000000',newStock.apiData) |
|
|
|
console.log('0000000000000000000000000', newStock.apiData) |
|
|
|
// 检查场景应用部分是否已经在视口中,如果是则立即触发效果 |
|
|
|
setTimeout(() => { |
|
|
|
if (scenarioApplicationRef.value && parsedConclusion.value) { |
|
|
@ -697,7 +697,7 @@ function playAudio(url) { |
|
|
|
try { |
|
|
|
// 设置当前音频URL |
|
|
|
audioStore.setCurrentAudioUrl(url); |
|
|
|
|
|
|
|
|
|
|
|
// 停止之前的音频 |
|
|
|
if (audioStore.nowSound && audioStore.nowSound.playing()) { |
|
|
|
audioStore.nowSound.stop(); |
|
|
@ -781,7 +781,11 @@ async function handleSendMessage(input) { |
|
|
|
ElMessage.warning("输入内容不能为空"); |
|
|
|
return; |
|
|
|
} |
|
|
|
|
|
|
|
// 触发图片旋转 |
|
|
|
isRotating.value = true; |
|
|
|
// 设置加载状态,隐藏图表页面 |
|
|
|
isLoading.value = true; |
|
|
|
|
|
|
|
if (input.trim()) { |
|
|
|
const userMessage = reactive({ sender: 'user', text: input }); |
|
|
|
messages.value.push(userMessage); |
|
|
@ -813,12 +817,9 @@ async function handleSendMessage(input) { |
|
|
|
|
|
|
|
if (parsedData && parsedData.market && parsedData.code) { |
|
|
|
console.log("工作流接口返回股票信息:", parsedData); |
|
|
|
// 设置加载状态,隐藏图表页面 |
|
|
|
isLoading.value = true; |
|
|
|
|
|
|
|
isPageLoaded.value = false; |
|
|
|
// 触发图片旋转 |
|
|
|
isRotating.value = true; |
|
|
|
|
|
|
|
|
|
|
|
// 调用第二个工作流接口 |
|
|
|
const conclusionParams = { |
|
|
|
content: input.trim(), |
|
|
@ -1167,7 +1168,7 @@ onMounted(async () => { |
|
|
|
} catch (error) { |
|
|
|
console.error('情绪大模型页面:获取用户次数失败', error); |
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
startImageRotation(); |
|
|
|
|
|
|
|
// 等待DOM完全渲染后设置监听器 |
|
|
|