diff --git a/.env.development b/.env.development
index 981be04..d360df7 100644
--- a/.env.development
+++ b/.env.development
@@ -5,9 +5,10 @@ VITE_OUTPUT_DIR = 'dev'
VITE_PUBLIC_PATH = /
#新数据接口
-VITE_APP_API_BASE_URL = "http://39.101.133.168:8828/link"
-# VITE_APP_API_BASE_URL = "https://api.homilychart.com/link"
-VITE_APP_API_BASE_CAZE_URL = "http://39.101.133.168:8828/link"
+# VITE_APP_API_BASE_URL = "http://39.101.133.168:8828/link"
+VITE_APP_API_BASE_URL = "https://api.homilychart.com/link"
+# VITE_APP_API_BASE_CAZE_URL = "http://39.101.133.168:8828/link"
+VITE_APP_API_BASE_CAZE_URL = "https://api.homilychart.com/link"
VITE_APP_IMG_API_BASE_URL = "http://39.101.133.168:8828/hljw/api/aws/upload"
#MJ API
diff --git a/src/store/userPessionCode.js b/src/store/userPessionCode.js
index f8b34be..9c8b584 100644
--- a/src/store/userPessionCode.js
+++ b/src/store/userPessionCode.js
@@ -86,7 +86,7 @@ export const useUserStore = defineStore('user', () => {
}
}
onMounted(() => {
- init()
+ // init()
})
return {
diff --git a/src/views/AIchat.vue b/src/views/AIchat.vue
index 48607e7..fa075a2 100644
--- a/src/views/AIchat.vue
+++ b/src/views/AIchat.vue
@@ -47,7 +47,7 @@ renderer.del = function (text) {
};
// 定义自定义事件
-const emit = defineEmits(["updateMessage", "sendMessage"]);
+const emit = defineEmits(["updateMessage", "sendMessage", "enableInput"]);
// 音频播放方法
const playAudio = (url) => {
@@ -451,6 +451,7 @@ const createTypingEffect = (message, content, speed) => {
content: "工作流返回出错,请稍后重试",
});
chatStore.isLoading = false;
+ emit('enableInput');
if (message.error == "2") {
apiStatus.two.isError = true;
} else if (message.error == "3") {
@@ -462,6 +463,7 @@ const createTypingEffect = (message, content, speed) => {
if (message.end) {
chatStore.getUserCount();
chatStore.isLoading = false;
+ emit('enableInput');
}
message.isTyping = false;
nextTick(() => {
@@ -580,6 +582,7 @@ const createTypingEffect = (message, content, speed) => {
content: "工作流返回出错,请稍后重试",
});
chatStore.isLoading = false;
+ emit('enableInput');
if (message.error == "2") {
apiStatus.two.isError = true;
} else if (message.error == "3") {
@@ -612,6 +615,7 @@ const createTypingEffect = (message, content, speed) => {
content: "工作流返回出错,请稍后重试",
});
chatStore.isLoading = false;
+ emit('enableInput');
if (message.error == "2") {
apiStatus.two.isError = true;
} else if (message.error == "3") {
@@ -738,6 +742,7 @@ watch(
});
chatStore.isLoading = false;
+ emit('enableInput');
}
} catch (e) {
console.log(e, "意图识别失败");
@@ -748,6 +753,7 @@ watch(
content: "工作流返回出错,请稍后重试",
});
chatStore.isLoading = false;
+ emit('enableInput');
}
if (flag) {
@@ -1572,6 +1578,7 @@ watch(
content: "工作流返回出错,请稍后重试",
});
chatStore.isLoading = false;
+ emit('enableInput');
}
}
@@ -1671,6 +1678,7 @@ watch(
content: "工作流返回出错,请稍后重试",
});
chatStore.isLoading = false;
+ emit('enableInput');
}
}
}
@@ -1856,6 +1864,7 @@ watch(
content: "工作流返回出错,请稍后重试1111",
});
chatStore.isLoading = false;
+ emit('enableInput');
}
}
}
@@ -1990,6 +1999,7 @@ watch(
content: "工作流返回出错,请稍后重试",
});
chatStore.isLoading = false;
+ emit('enableInput');
}
}
}
@@ -2166,6 +2176,7 @@ watch(
content: "数据缺失,请稍后重试",
});
chatStore.isLoading = false;
+ emit('enableInput');
}
// 同时发起所有API调用
diff --git a/src/views/AiEmotion.vue b/src/views/AiEmotion.vue
index 81c3f20..4e02cdf 100644
--- a/src/views/AiEmotion.vue
+++ b/src/views/AiEmotion.vue
@@ -797,6 +797,15 @@ function startTypewriterEffect(conclusion, onComplete) {
for (let i = 0; i <= disclaimerText.length; i++) {
const timer = setTimeout(() => {
displayedTexts.value.disclaimer = disclaimerText.substring(0, i);
+ // 在免责声明打字机效果完成后调用回调函数
+ if (i === disclaimerText.length) {
+ console.log('打字机效果完成,调用onComplete回调');
+ if (onComplete && typeof onComplete === 'function') {
+ onComplete();
+ // 清除保存的回调函数
+ currentOnCompleteCallback.value = null;
+ }
+ }
}, totalDelay + i * typeSpeed);
typewriterTimers.value.push(timer);
}
diff --git a/src/views/components/marketTemperature.vue b/src/views/components/marketTemperature.vue
index 3e63657..2ac0caf 100644
--- a/src/views/components/marketTemperature.vue
+++ b/src/views/components/marketTemperature.vue
@@ -371,11 +371,14 @@ function initChart(raw, klineDataRawValue, WDRLValue) {
const stockData = raw.map((item) => Math.round(item[2]));
// 处理数据重合时只显示市场温度的逻辑
- const processedStockData = stockData.map((stockTemp, index) => {
+ // 检查是否所有数据都重合
+ const allDataMatch = stockData.every((stockTemp, index) => {
const marketTemp = marketData[index];
- // 当市场温度和股票温度相同时,股票温度设为null(不显示)
- return stockTemp === marketTemp ? null : stockTemp;
+ return stockTemp === marketTemp;
});
+
+ // 只有当全部数据都重合时,才只显示市场温度(股票温度设为null)
+ const processedStockData = allDataMatch ? stockData.map(() => null) : stockData;
// 创建新的图表实例
chartInstance = echarts.init(KlineCanvs.value);
diff --git a/src/views/homePage.vue b/src/views/homePage.vue
index 9623b6b..9d03e06 100644
--- a/src/views/homePage.vue
+++ b/src/views/homePage.vue
@@ -198,10 +198,10 @@ const sendMessage = async () => {
// 调用 ensureAIchat 确保跳转到 AIchat 页面
ensureAIchat();
- console.log(chatStore.isLoading, "isLoading.value1111");
- if (chatStore.isLoading) return;
- chatStore.isLoading=true;
- console.log(chatStore.isLoading, "isLoading.value2222");
+ console.log(isInputDisabled.value, "isInputDisabled.value1111");
+ if (isInputDisabled.value) return;
+ isInputDisabled.value = true;
+ console.log(isInputDisabled.value, "isInputDisabled.value2222");
const messageContent = message.value;
// 重置消息输入框
@@ -222,6 +222,11 @@ const sendMessage = async () => {
}, 200);
};
+// 重新启用输入框的方法
+const enableInput = () => {
+ isInputDisabled.value = false;
+};
+
// 公告
// 引入公告组件
import Announcement from "./Announcement.vue";
@@ -605,6 +610,7 @@ onUnmounted(() => {
@updateMessage="updateMessage"
@sendMessage="sendMessage"
@ensureAIchat="ensureAIchat"
+ @enableInput="enableInput"
ref="aiEmotionRef"
/>
@@ -679,17 +685,11 @@ onUnmounted(() => {
>
-
-