This commit is contained in:
张成
2025-11-15 09:43:26 +08:00
parent 53673a41b1
commit 146314f59a
5 changed files with 12 additions and 3 deletions

View File

@@ -152,7 +152,7 @@ const HomeNavbar = (props: IProps) => {
top: 0, top: 0,
left: 0, left: 0,
width: '100%', width: '100%',
height: `${statusBarHeight + navBarHeight}px`, height: `${ navBarHeight}px`,
paddingTop: `${statusBarHeight}px`, paddingTop: `${statusBarHeight}px`,
backgroundColor: 'transparent', backgroundColor: 'transparent',
zIndex: 99, zIndex: 99,

View File

@@ -17,7 +17,8 @@
// 评论列表滚动区域 // 评论列表滚动区域
.comment-scroll { .comment-scroll {
height: calc(100vh - 100px); flex: 1;
height: 0;
padding: 0 15px; padding: 0 15px;
box-sizing: border-box; box-sizing: border-box;

View File

@@ -1,6 +1,7 @@
import { useState, useEffect } from "react"; import { useState, useEffect } from "react";
import { View, Text, ScrollView, Image, Input } from "@tarojs/components"; import { View, Text, ScrollView, Image, Input } from "@tarojs/components";
import { withAuth, EmptyState, GeneralNavbar } from "@/components"; import { withAuth, EmptyState, GeneralNavbar } from "@/components";
import { useGlobalState } from "@/store/global";
import commentService, { CommentActivity } from "@/services/commentService"; import commentService, { CommentActivity } from "@/services/commentService";
import { formatShortRelativeTime } from "@/utils/timeUtils"; import { formatShortRelativeTime } from "@/utils/timeUtils";
import Taro from "@tarojs/taro"; import Taro from "@tarojs/taro";
@@ -31,6 +32,8 @@ const CommentReply = () => {
const [replyTarget, setReplyTarget] = useState<CommentReplyItem | null>(null); const [replyTarget, setReplyTarget] = useState<CommentReplyItem | null>(null);
const [replyContent, setReplyContent] = useState(""); const [replyContent, setReplyContent] = useState("");
const [inputFocus, setInputFocus] = useState(false); const [inputFocus, setInputFocus] = useState(false);
const { statusNavbarHeightInfo } = useGlobalState() || {};
const { totalHeight = 98 } = statusNavbarHeightInfo || {};
useEffect(() => { useEffect(() => {
getCommentReplyList(); getCommentReplyList();
@@ -295,6 +298,7 @@ const CommentReply = () => {
<ScrollView <ScrollView
scrollY scrollY
className="comment-scroll" className="comment-scroll"
style={{ paddingTop: `${totalHeight}px` }}
scrollWithAnimation scrollWithAnimation
enhanced enhanced
showScrollbar={false} showScrollbar={false}

View File

@@ -1,6 +1,7 @@
import { useState, useEffect } from "react"; import { useState, useEffect } from "react";
import { View, Text, ScrollView, Image } from "@tarojs/components"; import { View, Text, ScrollView, Image } from "@tarojs/components";
import { withAuth, EmptyState, GeneralNavbar } from "@/components"; import { withAuth, EmptyState, GeneralNavbar } from "@/components";
import { useGlobalState } from "@/store/global";
import FollowService from "@/services/followService"; import FollowService from "@/services/followService";
import { formatShortRelativeTime } from "@/utils/timeUtils"; import { formatShortRelativeTime } from "@/utils/timeUtils";
import Taro from "@tarojs/taro"; import Taro from "@tarojs/taro";
@@ -23,6 +24,8 @@ const NewFollow = () => {
const [followList, setFollowList] = useState<FollowItem[]>([]); const [followList, setFollowList] = useState<FollowItem[]>([]);
const [loading, setLoading] = useState(false); const [loading, setLoading] = useState(false);
const [refreshing, setRefreshing] = useState(false); const [refreshing, setRefreshing] = useState(false);
const { statusNavbarHeightInfo } = useGlobalState() || {};
const { totalHeight = 98 } = statusNavbarHeightInfo || {};
useEffect(() => { useEffect(() => {
getFollowList(); getFollowList();
@@ -211,6 +214,7 @@ const NewFollow = () => {
<ScrollView <ScrollView
scrollY scrollY
className="follow-scroll" className="follow-scroll"
style={{ paddingTop: `${totalHeight}px` }}
scrollWithAnimation scrollWithAnimation
enhanced enhanced
showScrollbar={false} showScrollbar={false}

View File

@@ -2,7 +2,7 @@ export default definePageConfig({
navigationBarTitleText: "编辑资料", navigationBarTitleText: "编辑资料",
navigationBarBackgroundColor: "#ffffff", navigationBarBackgroundColor: "#ffffff",
navigationBarTextStyle: "black", navigationBarTextStyle: "black",
backgroundColor: "#f5f5f5", backgroundColor: "#fafafa", // 与 CSS 中的背景色保持一致
enablePullDownRefresh: false, enablePullDownRefresh: false,
disableScroll: false, disableScroll: false,
navigationStyle: "custom", navigationStyle: "custom",