diff --git a/src/views/homePage.vue b/src/views/homePage.vue index c413ac8..47c9944 100644 --- a/src/views/homePage.vue +++ b/src/views/homePage.vue @@ -32,7 +32,7 @@ import msgBtn from "../assets/img/homePage/tail/msg.png"; import feedbackBtn from "../assets/img/Feedback/feedbackBtn.png"; import AiEmotion from "./AiEmotion.vue"; -import VConsole from 'vconsole'; +import VConsole from "vconsole"; const vConsole = new VConsole(); @@ -48,7 +48,7 @@ const emotionAudioStore = useEmotionAudioStore(); const audioStore = useAudioStore(); // 根据当前页面类型获取对应的音频store const getCurrentAudioStore = () => { - return activeTab.value === 'AiEmotion' ? emotionAudioStore : audioStore; + return activeTab.value === "AiEmotion" ? emotionAudioStore : audioStore; }; const isVoice = computed(() => { @@ -58,7 +58,7 @@ const isVoice = computed(() => { const toggleVoice = () => { const currentStore = getCurrentAudioStore(); - + if (!currentStore.isVoiceEnabled) { // 如果语音功能关闭,先开启语音功能 currentStore.toggleVoice(); @@ -168,13 +168,13 @@ const sendMessage = async () => { ElMessage.error("请先登录"); return; } - + // 检查输入内容是否为空 if (!message.value || !message.value.trim()) { ElMessage.warning("输入内容不能为空"); return; } - + isScrolling.value = false; // 判断当前是否为 AiEmotion 组件 @@ -616,20 +616,56 @@ onMounted(async () => { alt="夺宝奇兵大模型" /> - AI情绪大模型 - - - + AI情绪大模型 + + +