|
@ -183,12 +183,14 @@ import blueBorderImg from '@/assets/img/AiEmotion/blueBorder.png' //导入蓝色 |
|
|
import { ElMessage } from 'element-plus'; |
|
|
import { ElMessage } from 'element-plus'; |
|
|
import { useEmotionStore } from '@/store/emotion'; // 导入Pinia store |
|
|
import { useEmotionStore } from '@/store/emotion'; // 导入Pinia store |
|
|
import { useAudioStore } from '@/store/audio.js'; // 导入音频store |
|
|
import { useAudioStore } from '@/store/audio.js'; // 导入音频store |
|
|
|
|
|
import { useChatStore } from '@/store/chat.js'; // 导入聊天store |
|
|
import { Howl, Howler } from 'howler'; // 导入音频播放库 |
|
|
import { Howl, Howler } from 'howler'; // 导入音频播放库 |
|
|
import { reactive } from 'vue'; |
|
|
import { reactive } from 'vue'; |
|
|
import { marked } from 'marked'; // 引入marked库 |
|
|
import { marked } from 'marked'; // 引入marked库 |
|
|
// 使用Pinia store |
|
|
// 使用Pinia store |
|
|
const emotionStore = useEmotionStore(); |
|
|
const emotionStore = useEmotionStore(); |
|
|
const audioStore = useAudioStore(); |
|
|
const audioStore = useAudioStore(); |
|
|
|
|
|
const chatStore = useChatStore(); |
|
|
|
|
|
|
|
|
// 处理refuse数据的函数 |
|
|
// 处理refuse数据的函数 |
|
|
function processRefuseMessage(refuseData) { |
|
|
function processRefuseMessage(refuseData) { |
|
@ -1157,7 +1159,15 @@ function triggerAutoScroll() { |
|
|
} |
|
|
} |
|
|
|
|
|
|
|
|
// 页面挂载完成后触发图片旋转和设置滚动监听 |
|
|
// 页面挂载完成后触发图片旋转和设置滚动监听 |
|
|
onMounted(() => { |
|
|
|
|
|
|
|
|
onMounted(async () => { |
|
|
|
|
|
// 确保获取用户次数 |
|
|
|
|
|
try { |
|
|
|
|
|
await chatStore.getUserCount(); |
|
|
|
|
|
console.log('情绪大模型页面:用户次数获取成功'); |
|
|
|
|
|
} catch (error) { |
|
|
|
|
|
console.error('情绪大模型页面:获取用户次数失败', error); |
|
|
|
|
|
} |
|
|
|
|
|
|
|
|
startImageRotation(); |
|
|
startImageRotation(); |
|
|
|
|
|
|
|
|
// 等待DOM完全渲染后设置监听器 |
|
|
// 等待DOM完全渲染后设置监听器 |
|
|