diff --git a/src/views/AiEmotion.vue b/src/views/AiEmotion.vue
index 57c85c4..841d31c 100644
--- a/src/views/AiEmotion.vue
+++ b/src/views/AiEmotion.vue
@@ -440,7 +440,7 @@ watch(currentStock, (newStock) => {
two: conclusion.two || '',
three: conclusion.three || '',
four: conclusion.four || '',
- disclaimer: '该内容由AI内容生成,请注意甄别'
+ disclaimer: '该内容由AI生成,请注意甄别'
};
displayedTitles.value = {
one: 'L1: 情绪监控',
@@ -651,7 +651,7 @@ function startTypewriterEffect(conclusion) {
});
// 添加免责声明的打字机效果(在所有模块显示完成后)
- const disclaimerText = '该内容由AI内容生成,请注意甄别';
+ const disclaimerText = '该内容由AI生成,请注意甄别';
// 显示免责声明模块
const showDisclaimerTimer = setTimeout(() => {
@@ -1109,7 +1109,7 @@ function setupIntersectionObserver() {
two: conclusion.two || '',
three: conclusion.three || '',
four: conclusion.four || '',
- disclaimer: '该内容由AI内容生成,请注意甄别'
+ disclaimer: '该内容由AI生成,请注意甄别'
};
displayedTitles.value = {
one: 'L1: 情绪监控',
diff --git a/src/views/homePage.vue b/src/views/homePage.vue
index 73728e9..2be9bd2 100644
--- a/src/views/homePage.vue
+++ b/src/views/homePage.vue
@@ -11,6 +11,7 @@ import { useAppBridge } from "../assets/js/useAppBridge.js";
import { useDataStore } from "@/store/dataList.js";
import { useChatStore } from "../store/chat";
import { useEmotionAudioStore } from "../store/emotionAudio";
+import { useAudioStore } from "../store/audio";
import _ from "lodash";
import logo from "../assets/img/homePage/logo.png";
@@ -44,19 +45,31 @@ const chatStore = useChatStore();
// 变量
// 音频管理
const emotionAudioStore = useEmotionAudioStore();
-const isVoice = computed(() => emotionAudioStore.isVoiceEnabled);
+const audioStore = useAudioStore();
+// 根据当前页面类型获取对应的音频store
+const getCurrentAudioStore = () => {
+ return activeTab.value === 'AiEmotion' ? emotionAudioStore : audioStore;
+};
+
+const isVoice = computed(() => {
+ const currentStore = getCurrentAudioStore();
+ return currentStore.isVoiceEnabled;
+});
+
const toggleVoice = () => {
- if (!emotionAudioStore.isVoiceEnabled) {
+ const currentStore = getCurrentAudioStore();
+
+ if (!currentStore.isVoiceEnabled) {
// 如果语音功能关闭,先开启语音功能
- emotionAudioStore.toggleVoice();
+ currentStore.toggleVoice();
} else {
// 如果语音功能开启,则切换播放/暂停状态
- if (emotionAudioStore.currentAudioUrl || emotionAudioStore.ttsUrl) {
+ if (currentStore.currentAudioUrl || currentStore.ttsUrl) {
// 有音频时切换播放/暂停
- emotionAudioStore.togglePlayPause();
+ currentStore.togglePlayPause();
} else {
// 没有音频时关闭语音功能
- emotionAudioStore.toggleVoice();
+ currentStore.toggleVoice();
}
}
};
@@ -605,8 +618,8 @@ onMounted(async () => {
-
-
+
+