From 4a8daf207ae4482e1c386aba2a2d1a9053dff1cf Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E5=AE=8B=E6=9D=B0?= Date: Thu, 14 Aug 2025 16:04:24 +0800 Subject: [PATCH] =?UTF-8?q?=E6=80=9D=E8=80=83=E8=BF=87=E7=A8=8B=E4=BD=BF?= =?UTF-8?q?=E7=94=A8=E5=AF=BC=E5=85=A5=E5=9B=BE=E7=89=87=E7=9A=84=E6=96=B9?= =?UTF-8?q?=E5=BC=8F=EF=BC=9B?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/views/AIchat.vue | 13 ++++++++----- src/views/AiEmotion.vue | 12 ++++++++---- 2 files changed, 16 insertions(+), 9 deletions(-) diff --git a/src/views/AIchat.vue b/src/views/AIchat.vue index f84eb9e..1c192c8 100644 --- a/src/views/AIchat.vue +++ b/src/views/AIchat.vue @@ -18,6 +18,10 @@ import { useChatStore } from "../store/chat"; import { useAudioStore } from "../store/audio"; import { useDataStore } from "@/store/dataList.js"; import { marked } from "marked"; // 引入marked库 +// 导入思考过程GIF +import thinkingGif from '@/assets/img/gif/思考.gif'; +import analyzeGif from '@/assets/img/gif/解析.gif'; +import generateGif from '@/assets/img/gif/生成.gif'; import katex from "katex"; // 引入 KaTeX 库 import { htmlToText } from "html-to-text"; import { Howl, Howler } from "howler"; @@ -953,7 +957,7 @@ async function showThinkingProcess(stockName = null) { type: "ing", flag: true, content: "正在思考......", - gif: "/src/assets/img/gif/思考.gif", + gif: thinkingGif, }); chatStore.messages.push(thinkingMessage1); await new Promise((resolve) => setTimeout(resolve, 1500)); @@ -966,7 +970,7 @@ async function showThinkingProcess(stockName = null) { type: "ing", flag: true, content: "正在解析关键数据......", - gif: "/src/assets/img/gif/解析.gif", + gif: analyzeGif, }); chatStore.messages.push(thinkingMessage2); @@ -986,7 +990,7 @@ async function showThinkingProcess(stockName = null) { type: "ing", flag: true, content: `正在生成${stockName}全景作战报告......`, - gif: "/src/assets/img/gif/生成.gif", + gif: generateGif, }); chatStore.messages.push(thinkingMessage3); await new Promise((resolve) => setTimeout(resolve, 1500)); @@ -999,7 +1003,6 @@ async function showThinkingProcess(stockName = null) { type: "ing", flag: true, content: "报告已生成!", - gif: "/src/assets/img/gif/生成.gif", }); chatStore.messages.push(thinkingMessage4); await new Promise((resolve) => setTimeout(resolve, 1500)); @@ -1028,7 +1031,7 @@ async function continueThinkingProcess(thinkingMessageRef, stockName) { type: "ing", flag: true, content: `正在生成${stockName}全景作战报告......`, - gif: "/src/assets/img/gif/生成.gif", + gif: generateGif, }); chatStore.messages.push(thinkingMessage3); await new Promise((resolve) => setTimeout(resolve, 1500)); diff --git a/src/views/AiEmotion.vue b/src/views/AiEmotion.vue index 7abc1b6..97c60b7 100644 --- a/src/views/AiEmotion.vue +++ b/src/views/AiEmotion.vue @@ -228,6 +228,10 @@ import { ElMessage } from 'element-plus'; // 接口失败提示已改为对话 import { useEmotionStore } from '@/store/emotion'; // 导入Pinia store import { useEmotionAudioStore } from '@/store/emotionAudio.js'; // 导入音频store import { useChatStore } from '@/store/chat.js'; // 导入聊天store +// 导入思考过程GIF +import thinkingGif from '@/assets/img/gif/思考.gif'; +import analyzeGif from '@/assets/img/gif/解析.gif'; +import generateGif from '@/assets/img/gif/生成.gif'; import getCountAll from "../assets/img/homePage/get-count-all.png"; import voice from "../assets/img/homePage/tail/voice.png"; import voiceNoActive from "../assets/img/homePage/tail/voice-no-active.png"; @@ -1627,7 +1631,7 @@ async function showThinkingProcess(stockName = null) { const thinkingMessage1 = reactive({ sender: 'ai', text: 'AI情绪大模型正在思考......', - gif: '/src/assets/img/gif/思考.gif' + gif: thinkingGif }); messages.value.push(thinkingMessage1); await new Promise(resolve => setTimeout(resolve, 1500)); @@ -1637,7 +1641,7 @@ async function showThinkingProcess(stockName = null) { const thinkingMessage2 = reactive({ sender: 'ai', text: 'AI情绪大模型正在解析关键数据......', - gif: '/src/assets/img/gif/解析.gif' + gif: analyzeGif }); messages.value.push(thinkingMessage2); @@ -1654,7 +1658,7 @@ async function showThinkingProcess(stockName = null) { const thinkingMessage3 = reactive({ sender: 'ai', text: `AI情绪大模型正在生成${stockName}量子四维矩阵图......`, - gif: '/src/assets/img/gif/生成.gif' + gif: generateGif }); messages.value.push(thinkingMessage3); await new Promise(resolve => setTimeout(resolve, 1500)); @@ -1686,7 +1690,7 @@ async function continueThinkingProcess(thinkingMessageRef, stockName) { const thinkingMessage3 = reactive({ sender: 'ai', text: `正在生成${stockName}量子四维矩阵图......`, - gif: '/src/assets/img/gif/生成.gif' + gif: generateGif }); messages.value.push(thinkingMessage3);