From 49d35ba42c7257466a654e319a531cc66087b88c Mon Sep 17 00:00:00 2001 From: no99 <17663930442@163.com> Date: Wed, 15 Oct 2025 18:12:11 +0800 Subject: [PATCH] =?UTF-8?q?=E6=94=B9=E5=AE=89=E5=8D=93=E8=BE=93=E5=85=A5?= =?UTF-8?q?=E6=A1=86=E4=B8=8A=E5=BC=B91?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/views/homePage.vue | 26 +++++++++----------------- 1 file changed, 9 insertions(+), 17 deletions(-) diff --git a/src/views/homePage.vue b/src/views/homePage.vue index d0b9e24..93b8980 100644 --- a/src/views/homePage.vue +++ b/src/views/homePage.vue @@ -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"); @@ -1027,6 +1027,8 @@ const adjustFooterPosition = (height) => { const homePage = document.querySelector(".homepage"); homePage.style.height = `${height}px`; + html.style.height = `${height}px`; + body.style.height = `${height}px`; // homePage.style.height = `460px`; html.scrollTop = 0; @@ -1038,6 +1040,8 @@ const adjustFooterPosition = (height) => { html.scrollTop = 0; } + await nextTick(); + html.scrollTop = 0; setTimeout(() => { // 隐藏滚动条 html.style.overflow = "hidden"; @@ -1077,17 +1081,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) { @@ -3230,10 +3223,9 @@ body { } @media (min-width: 320px) and (max-width: 375px) { - .tokenRuleDialog { - bottom: 10%; - } - + .tokenRuleDialog { + bottom: 10%; + } }