diff --git a/src/components/HomeNavbar/index.tsx b/src/components/HomeNavbar/index.tsx index 74c7b1c..e6e0d69 100644 --- a/src/components/HomeNavbar/index.tsx +++ b/src/components/HomeNavbar/index.tsx @@ -152,7 +152,7 @@ const HomeNavbar = (props: IProps) => { top: 0, left: 0, width: '100%', - height: `${statusBarHeight + navBarHeight}px`, + height: `${ navBarHeight}px`, paddingTop: `${statusBarHeight}px`, backgroundColor: 'transparent', zIndex: 99, diff --git a/src/other_pages/comment_reply/index.scss b/src/other_pages/comment_reply/index.scss index 267c044..02706ba 100644 --- a/src/other_pages/comment_reply/index.scss +++ b/src/other_pages/comment_reply/index.scss @@ -17,7 +17,8 @@ // 评论列表滚动区域 .comment-scroll { - height: calc(100vh - 100px); + flex: 1; + height: 0; padding: 0 15px; box-sizing: border-box; diff --git a/src/other_pages/comment_reply/index.tsx b/src/other_pages/comment_reply/index.tsx index a232c57..e7bdc41 100644 --- a/src/other_pages/comment_reply/index.tsx +++ b/src/other_pages/comment_reply/index.tsx @@ -1,6 +1,7 @@ import { useState, useEffect } from "react"; import { View, Text, ScrollView, Image, Input } from "@tarojs/components"; import { withAuth, EmptyState, GeneralNavbar } from "@/components"; +import { useGlobalState } from "@/store/global"; import commentService, { CommentActivity } from "@/services/commentService"; import { formatShortRelativeTime } from "@/utils/timeUtils"; import Taro from "@tarojs/taro"; @@ -31,6 +32,8 @@ const CommentReply = () => { const [replyTarget, setReplyTarget] = useState(null); const [replyContent, setReplyContent] = useState(""); const [inputFocus, setInputFocus] = useState(false); + const { statusNavbarHeightInfo } = useGlobalState() || {}; + const { totalHeight = 98 } = statusNavbarHeightInfo || {}; useEffect(() => { getCommentReplyList(); @@ -295,6 +298,7 @@ const CommentReply = () => { { const [followList, setFollowList] = useState([]); const [loading, setLoading] = useState(false); const [refreshing, setRefreshing] = useState(false); + const { statusNavbarHeightInfo } = useGlobalState() || {}; + const { totalHeight = 98 } = statusNavbarHeightInfo || {}; useEffect(() => { getFollowList(); @@ -211,6 +214,7 @@ const NewFollow = () => {