From db9a4a2c83a59aa221731a226a18d8d569db4324 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E5=BC=A0=E6=88=90?= Date: Sun, 9 Nov 2025 00:21:49 +0800 Subject: [PATCH] 1 --- src/app.config.ts | 2 +- src/components/BackNavbar/index.tsx | 5 ++- src/other_pages/comment_reply/index.scss | 57 +----------------------- src/other_pages/message/index.scss | 3 -- src/other_pages/message/index.tsx | 2 + src/other_pages/new_follow/index.tsx | 10 ++++- 6 files changed, 15 insertions(+), 64 deletions(-) diff --git a/src/app.config.ts b/src/app.config.ts index 750c185..889c52e 100644 --- a/src/app.config.ts +++ b/src/app.config.ts @@ -73,7 +73,7 @@ export default defineAppConfig({ window: { backgroundTextStyle: "light", - navigationBarBackgroundColor: "#fff", + navigationBarBackgroundColor: "#FAFAFA", navigationBarTextStyle: "black", backgroundColor: "#FAFAFA", }, diff --git a/src/components/BackNavbar/index.tsx b/src/components/BackNavbar/index.tsx index a5d1770..5cd55c0 100644 --- a/src/components/BackNavbar/index.tsx +++ b/src/components/BackNavbar/index.tsx @@ -23,6 +23,7 @@ const BackNavbar: React.FC = ({ className = '' }) => { const userInfo = useUserInfo(); + const { statusBarHeight, navBarHeight, totalHeight } = getNavbarHeight(); const handleBack = () => { @@ -39,7 +40,7 @@ const BackNavbar: React.FC = ({ style={{ paddingTop: `${statusBarHeight}px`, height: `${totalHeight}px`, - backgroundColor: backgroundColor || "#ffffff" + backgroundColor: backgroundColor || "#fafafa" }} > = ({ {showAvatar && ( )} diff --git a/src/other_pages/comment_reply/index.scss b/src/other_pages/comment_reply/index.scss index c095c15..267c044 100644 --- a/src/other_pages/comment_reply/index.scss +++ b/src/other_pages/comment_reply/index.scss @@ -10,65 +10,10 @@ box-sizing: border-box; display: flex; flex-direction: column; - background: #FFFFFF; + overflow: hidden; - // 顶部导航栏 - .navbar { - height: 100px; - background: #FFFFFF; - flex-shrink: 0; - z-index: 100; - .navbar-content { - height: 56px; - display: flex; - align-items: center; - padding: 0 15px; - margin-top: 44px; - gap: 12px; - - .back-button { - width: 24px; - height: 24px; - display: flex; - align-items: center; - justify-content: center; - cursor: pointer; - flex-shrink: 0; - margin-top: 2px; - - .back-icon { - width: 10px; - height: 10px; - position: relative; - display: flex; - align-items: center; - justify-content: center; - - &::before { - content: ''; - position: absolute; - width: 10px; - height: 10px; - border-left: 2px solid #000000; - border-bottom: 2px solid #000000; - transform: rotate(45deg) translateY(-1px); - } - } - } - - .navbar-title { - font-family: 'PingFang SC'; - font-weight: 600; - font-size: 20px; - line-height: 1.4; - letter-spacing: 0.019em; - color: #000000; - flex: 1; - } - } - } // 评论列表滚动区域 .comment-scroll { diff --git a/src/other_pages/message/index.scss b/src/other_pages/message/index.scss index f705270..4a43415 100644 --- a/src/other_pages/message/index.scss +++ b/src/other_pages/message/index.scss @@ -16,7 +16,6 @@ justify-content: space-between; gap: 20px; padding: 6px 24px; - background: #ffffff; box-sizing: border-box; height: 124px; @@ -83,8 +82,6 @@ .message-scroll { flex: 1; overflow: hidden; - background: #ffffff; - .message-cards { padding: 12px; display: flex; diff --git a/src/other_pages/message/index.tsx b/src/other_pages/message/index.tsx index ab04f7c..3e6ffe0 100644 --- a/src/other_pages/message/index.tsx +++ b/src/other_pages/message/index.tsx @@ -143,6 +143,7 @@ const Message = () => { 评论和回复 @@ -153,6 +154,7 @@ const Message = () => { 新增关注 diff --git a/src/other_pages/new_follow/index.tsx b/src/other_pages/new_follow/index.tsx index 16ef3e9..4de047b 100644 --- a/src/other_pages/new_follow/index.tsx +++ b/src/other_pages/new_follow/index.tsx @@ -36,7 +36,7 @@ const NewFollow = () => { try { const res = await FollowService.get_new_fans_list(1, 20); - if (res.list) { + if (res.list && res.list.length > 0) { // 映射数据 const mappedList = res.list.map((item: any) => ({ id: item.id, @@ -51,6 +51,9 @@ const NewFollow = () => { })); setFollowList(mappedList); + } else { + // 如果没有数据,设置为空数组以显示空状态 + setFollowList([]); } } catch (e) { Taro.showToast({ @@ -131,7 +134,7 @@ const NewFollow = () => { try { const res = await FollowService.get_new_fans_list(1, 20); - if (res.list) { + if (res.list && res.list.length > 0) { const mappedList = res.list.map((item: any) => ({ id: item.id, user_id: item.id, @@ -145,6 +148,9 @@ const NewFollow = () => { })); setFollowList(mappedList); + } else { + // 如果没有数据,设置为空数组以显示空状态 + setFollowList([]); } } catch (e) { Taro.showToast({