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);