diff --git a/src/store/chat.js b/src/store/chat.js index 32d8fbc..376129c 100644 --- a/src/store/chat.js +++ b/src/store/chat.js @@ -23,6 +23,7 @@ export const useChatStore = defineStore("chat", { firstAPICall:false, dbqbScrollToTop:true, + allowTyping:false, }), actions: { async getUserCount() { diff --git a/src/store/deepNine.js b/src/store/deepNine.js index c4f3798..b00a6ca 100644 --- a/src/store/deepNine.js +++ b/src/store/deepNine.js @@ -23,6 +23,7 @@ export const useDeepNineStore = defineStore("deepNine", { firstAPICall:false, dbqbScrollToTop:true, + allowTyping:false, }), actions: { async getUserCount() { diff --git a/src/views/AIchat.vue b/src/views/AIchat.vue index d0bcdf6..1603391 100644 --- a/src/views/AIchat.vue +++ b/src/views/AIchat.vue @@ -949,7 +949,9 @@ const processTypingQueue = async () => { while (typingQueue.value.length > 0) { const task = typingQueue.value.shift(); - await createTypingEffect(task.message, task.content, task.speed); + if (chatStore.allowTyping) { + await createTypingEffect(task.message, task.content, task.speed); + } } isTypingInProgress.value = false; @@ -1144,6 +1146,7 @@ watch( // 第一阶段,意图识别 try { + chatStore.allowTyping = true; // 调用工作流获取回复 const result = await dbqbFirstAPI(params1); codeData.value = result.data; @@ -2576,6 +2579,7 @@ watch( // 3. 停止打字机效果 typingQueue.value = []; isTypingInProgress.value = false; + chatStore.allowTyping = false; // 4. 重置加载状态 chatStore.isLoading = false; diff --git a/src/views/DBQBmodel.vue b/src/views/DBQBmodel.vue index ada3fcd..683d5a5 100644 --- a/src/views/DBQBmodel.vue +++ b/src/views/DBQBmodel.vue @@ -306,4 +306,10 @@ const closeNoPermissionDialog = () => { /* margin-top: 20px; */ } } +@media screen and (min-width: 375px) and (max-width: 400px) { + .top-icon { + margin-top: 2%; + width: 90%; + } +} diff --git a/src/views/DeepNineModel.vue b/src/views/DeepNineModel.vue index ddccb77..c1e33e9 100644 --- a/src/views/DeepNineModel.vue +++ b/src/views/DeepNineModel.vue @@ -316,4 +316,14 @@ const closeNoPermissionDialog = () => { /* margin-top: 20px; */ } } +@media screen and (max-width: 400px){ + .top-icon { + margin-top: -2%; + width: 80%; + } + .bottom-icon{ + gap: 1rem; + bottom: 5vh; + } +} diff --git a/src/views/Selectmodel.vue b/src/views/Selectmodel.vue index d3a1e83..e7e46f6 100644 --- a/src/views/Selectmodel.vue +++ b/src/views/Selectmodel.vue @@ -127,14 +127,26 @@ const calculatePaths = () => { const isMobile = window.innerWidth <= 768; // 计算曲线突出的程度(根据容器宽度调整) - const curveOffset = isMobile ? containerWidth * 0.15 : containerWidth * 0.1; + // PC端使用更大的弯曲度,使曲线更圆润,呈现四分之一圆的形状 + const curveOffset = isMobile ? containerWidth * 0.15 : containerWidth * 0.25; - // 计算控制点(左边向左突出,右边向右突出) - const leftControlX = topLeft.x - curveOffset; // 左边控制点向左偏移 - const leftControlY = (topLeft.y + bottom.y) / 2; - - const rightControlX = topRight.x + curveOffset; // 右边控制点向右偏移 - const rightControlY = (topRight.y + bottom.y) / 2; + // 计算控制点 + if (isMobile) { + // 移动端保持原来的计算方式 + var leftControlX = topLeft.x - curveOffset; + var leftControlY = (topLeft.y + bottom.y) / 2; + + var rightControlX = topRight.x + curveOffset; + var rightControlY = (topRight.y + bottom.y) / 2; + } else { + // PC端使用四分之一圆形状的控制点计算 + // 对于四分之一圆,控制点应位于起点和终点连线的垂直和水平位置 + var leftControlX = topLeft.x; + var leftControlY = bottom.y; + + var rightControlX = topRight.x; + var rightControlY = bottom.y; + } // 创建路径字符串 pathData.leftPath = `M ${topLeft.x} ${topLeft.y} Q ${leftControlX} ${leftControlY} ${bottom.x} ${bottom.y}`; @@ -246,8 +258,8 @@ const goToDeepNineModel = () => { stroke: #409eff; stroke-width: 2; fill: none; - stroke-dasharray: 5, 5; - animation: dash 1s linear infinite; + stroke-dasharray: none; + animation: none; } @keyframes dash { @@ -421,7 +433,7 @@ const goToDeepNineModel = () => { } .buttons-container { - margin-top: 18rem; + margin-top: 15rem; position: relative; width: 100%; } diff --git a/src/views/deepNine.vue b/src/views/deepNine.vue index 752291f..f2620f2 100644 --- a/src/views/deepNine.vue +++ b/src/views/deepNine.vue @@ -256,7 +256,8 @@ const toggleVoiceForUser = (index) => { !chatStore.messages[index].audioArray[0] || !chatStore.messages[index].audioArray[1] || !chatStore.messages[index].audioArray[2] || - !chatStore.messages[index].audioArray[3] + !chatStore.messages[index].audioArray[3] || + !chatStore.messages[index].audioArray[4] ) { return; } @@ -300,6 +301,10 @@ const toggleVoiceForUser = (index) => { audioPreloadStatus.four.loaded = true; audioPreloadStatus.four.url = chatStore.messages[index].audioArray[3]; } + if (chatStore.messages[index].audioArray[4]) { + audioPreloadStatus.five.loaded = true; + audioPreloadStatus.five.url = chatStore.messages[index].audioArray[4]; + } chatStore.currentUserIndex = index; audioQueue.value = []; isPlayingAudio.value = false; @@ -311,6 +316,7 @@ const toggleVoiceForUser = (index) => { addToAudioQueue(chatStore.messages[index].audioArray[1], "API2-第二个"); addToAudioQueue(chatStore.messages[index].audioArray[2], "API3-第三个"); addToAudioQueue(chatStore.messages[index].audioArray[3], "API4-第四个"); + addToAudioQueue(chatStore.messages[index].audioArray[4], "API5-第五个"); if (!audioStore.isVoiceEnabled) { audioStore.toggleVoice(); @@ -870,7 +876,9 @@ const processTypingQueue = async () => { while (typingQueue.value.length > 0) { const task = typingQueue.value.shift(); - await createTypingEffect(task.message, task.content, task.speed); + if (chatStore.allowTyping) { + await createTypingEffect(task.message, task.content, task.speed); + } } isTypingInProgress.value = false; @@ -1065,6 +1073,7 @@ watch( // 第一阶段,意图识别 try { + chatStore.allowTyping = true; // 调用工作流获取回复 const result = await deepNineFirstAPI(params1); codeData.value = result.data; @@ -1122,7 +1131,7 @@ watch( console.log(AIcontent, "AIcontent"); if (result.code == 406) { - AIcontent.value = `

尊敬的用户您好,您当前的“深度九大模型专属Token”数量为0,无法进行股票查询,可联系客服团队进行充值,感谢您的理解与支持

`; + AIcontent.value = `

尊敬的用户您好,您当前的“深度九大模型专属Token”余额不足,无法进行股票查询,可联系客服团队进行充值,感谢您的理解与支持

`; } const aiMsg = { @@ -1956,6 +1965,7 @@ watch( // 3. 停止打字机效果 typingQueue.value = []; isTypingInProgress.value = false; + chatStore.allowTyping = false; // 4. 重置加载状态 homepageChatStore.isLoading = false; @@ -2181,7 +2191,7 @@ watch( content: "该内容由AI生成,请注意甄别", end: true, }); - + } catch (e) { ElMessage.error("历史数据获取出错!"); console.error("e", e); diff --git a/src/views/homePage.vue b/src/views/homePage.vue index 83974ff..32d2715 100644 --- a/src/views/homePage.vue +++ b/src/views/homePage.vue @@ -45,9 +45,9 @@ import back from "../assets/img/Feedback/back.png"; import HistoryRecord from "./components/HistoryRecord.vue"; -// import VConsole from "vconsole"; +import VConsole from "vconsole"; -// const vConsole = new VConsole(); +const vConsole = new VConsole(); const isMobile = ref(null); @@ -455,7 +455,7 @@ const handleHistorySelect = (stockData) => { console.log("接收到历史记录数据:", stockData); // 只在情绪大模型中处理历史记录选择 - if (activeTab.value === 'AiEmotion') { + if (activeTab.value === "AiEmotion") { // 等待组件渲染完成后调用addStock方法 nextTick(() => { if (aiEmotionRef.value && aiEmotionRef.value.addStock) { @@ -1016,7 +1016,7 @@ const throttledHeightListener = _.throttle(heightListener, 500, { // // window.open(rechargeUrl) // }; -const adjustFooterPosition = (height) => { +const adjustFooterPosition = async (height) => { const html = document.querySelector("html"); const body = document.querySelector("body"); @@ -1026,7 +1026,7 @@ const adjustFooterPosition = (height) => { console.log("window.visualViewport", window.visualViewport.height); const homePage = document.querySelector(".homepage"); - homePage.style.height = `${height}px`; + // homePage.style.height = `${height}px`; // homePage.style.height = `460px`; html.scrollTop = 0; @@ -1038,6 +1038,8 @@ const adjustFooterPosition = (height) => { html.scrollTop = 0; } + await nextTick(); + html.scrollTop = 0; setTimeout(() => { // 隐藏滚动条 html.style.overflow = "hidden"; @@ -1077,17 +1079,6 @@ const onBlur = function () { }, 200); }; -// window.addEventListener("resize", () => { -// // 检测是否为iOS设备 -// const isIOS = /iPhone|iPad|iPod|ios/i.test(navigator.userAgent); -// console.log("是否为iOS设备:", isIOS); -// if (!isIOS) { -// console.log("窗口大小变化"); -// const homePage = document.querySelector(".homepage"); -// homePage.style.height = `${window.innerHeight}px`; -// } -// }); - let touchmoveHandlerRef = null; const touchmoveHandler = (e) => { if (!dataStore.isFeedback) { @@ -2676,7 +2667,7 @@ body { display: flex; width: 100%; margin-bottom: 30px; - flex-wrap: wrap; + justify-content: center; gap: 20px; } @@ -2685,8 +2676,10 @@ body { background-color: #f8f8f8; border-radius: 5px; padding: 10px 20px; - /* width: 40%; */ + width: 40%; white-space: nowrap; + align-items: center; + justify-content: center; } .changeImg { @@ -2744,7 +2737,7 @@ body { .changeLevelContent { display: flex; flex-wrap: wrap; - gap: 15px; + gap: 20px; margin-bottom: 10px; } @@ -2814,6 +2807,7 @@ body { padding: 10px; border-radius: 5px; cursor: pointer; + margin: 0 auto; } .changeBtn:hover { @@ -2972,7 +2966,7 @@ body { max-width: 500px; width: 70vw; max-height: 70vh; - overflow-y: auto; + /* overflow-y: auto; */ box-sizing: border-box; } @@ -3039,7 +3033,7 @@ body { .tokenRuleDialogContent { width: 80vw; padding: 15px 20px; - max-height: 80vh; + max-height: 85vh; } .tokenRuleDialogTitle { @@ -3123,10 +3117,17 @@ body { } .changeLevelItems { - flex: 0 0 calc(33% - 20px); + flex: 0 0 calc(33% - 30px); /* margin-right: auto; */ + font-size: 0.7rem; + min-width: 0px; } + /* .changeLevelItems { + + + } */ + .changeLevelTitle { align-items: center; display: flex; @@ -3153,10 +3154,7 @@ body { font-size: 0.5rem; } */ - .changeLevelItems { - font-size: 0.7rem; - min-width: 0px; - } + .changeLevelItemToken { white-space: nowrap; @@ -3225,6 +3223,12 @@ body { font-size: 1rem; } } + +@media (min-width: 320px) and (max-width: 375px) { + .tokenRuleDialog { + bottom: 10%; + } +}