From 8d729a0132fb9e9d23526b4d1855789fda2e6722 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E5=BC=A0=E6=88=90?= Date: Sat, 7 Feb 2026 00:51:30 +0800 Subject: [PATCH] 1 --- src/container/listContainer/index.tsx | 25 +++++++------------ src/login_pages/index/index.tsx | 2 +- src/main_pages/components/ListPageContent.tsx | 10 +++++--- src/main_pages/index.scss | 10 +++----- src/other_pages/bannerDetail/index.scss | 10 +++++--- .../enable_notification/index.scss | 3 +-- 6 files changed, 27 insertions(+), 33 deletions(-) diff --git a/src/container/listContainer/index.tsx b/src/container/listContainer/index.tsx index a75bf0e..fb1cb72 100644 --- a/src/container/listContainer/index.tsx +++ b/src/container/listContainer/index.tsx @@ -161,29 +161,22 @@ const ListContainer = (props) => { // 渲染 banner 卡片 const renderBanner = (item, index) => { - if (!item?.banner_image_url) return null; + if (!item?.banner_image_url) { + return null; + } return ( - { - const target = item.banner_detail_url; - if (target) { - (Taro as any).navigateTo({ - url: `/other_pages/bannerDetail/index?img=${encodeURIComponent(target)}`, - }); - } - }} - /> ); }; @@ -216,7 +209,7 @@ const ListContainer = (props) => { } if (match.type === "evaluateCard") { return ( - + ); } return ; diff --git a/src/login_pages/index/index.tsx b/src/login_pages/index/index.tsx index c0d653e..ef2eda6 100644 --- a/src/login_pages/index/index.tsx +++ b/src/login_pages/index/index.tsx @@ -193,7 +193,7 @@ const LoginPage: React.FC = () => { /> - {is_loading ? "登录中..." : "授权登录"} + {is_loading ? "登录中..." : "一键登录"} diff --git a/src/main_pages/components/ListPageContent.tsx b/src/main_pages/components/ListPageContent.tsx index b35ff52..8bf6a79 100644 --- a/src/main_pages/components/ListPageContent.tsx +++ b/src/main_pages/components/ListPageContent.tsx @@ -293,9 +293,9 @@ const ListPageContent: React.FC = ({ currentProvince, }); - // 地址发生变化或不一致,重新加载数据和球局数量 - // 先调用列表接口,然后在列表接口完成后调用数量接口 - (async () => { + // 延迟刷新,等 tab 切换动画完成后再加载,避免切换时列表重渲染导致抖动 + const delayMs = 280; + const timer = setTimeout(async () => { try { if (refreshBothLists) { await refreshBothLists(); @@ -311,7 +311,9 @@ const ListPageContent: React.FC = ({ } catch (error) { console.error("重新加载数据失败:", error); } - })(); + }, delayMs); + prevIsActiveRef.current = isActive; + return () => clearTimeout(timer); } } diff --git a/src/main_pages/index.scss b/src/main_pages/index.scss index 2e8d1a1..dc19c1e 100644 --- a/src/main_pages/index.scss +++ b/src/main_pages/index.scss @@ -21,21 +21,17 @@ top: 0; left: 0; opacity: 0; - transform: scale(0.98); - transition: opacity 0.35s cubic-bezier(0.25, 0.46, 0.45, 0.94), - transform 0.35s cubic-bezier(0.25, 0.46, 0.45, 0.94); + transition: opacity 0.25s ease-out; overflow-y: auto; -webkit-overflow-scrolling: touch; pointer-events: none; - will-change: opacity, transform; - backface-visibility: hidden; - -webkit-backface-visibility: hidden; + visibility: hidden; &.active { opacity: 1; - transform: scale(1); z-index: 1; pointer-events: auto; + visibility: visible; } } diff --git a/src/other_pages/bannerDetail/index.scss b/src/other_pages/bannerDetail/index.scss index e29887d..79a4b85 100644 --- a/src/other_pages/bannerDetail/index.scss +++ b/src/other_pages/bannerDetail/index.scss @@ -1,16 +1,20 @@ .banner_detail_page { min-height: 100vh; background: #ffffff; + display: flex; + flex-direction: column; } .banner_detail_content { padding: 12px; + display: flex; + align-items: center; + justify-content: center; + flex: 1; } .banner_detail_image { width: 100%; border-radius: 12px; display: block; -} - - +} \ No newline at end of file diff --git a/src/other_pages/enable_notification/index.scss b/src/other_pages/enable_notification/index.scss index 4eada00..b18b4dc 100644 --- a/src/other_pages/enable_notification/index.scss +++ b/src/other_pages/enable_notification/index.scss @@ -10,7 +10,7 @@ display: flex; flex-direction: column; align-items: center; - height: calc(100vh - 98px); + flex: 1; position: relative; overflow: hidden; } @@ -163,7 +163,6 @@ &__qr_image { width: 100%; - height: 100%; } &__qr_placeholder {