From 817b1dd8a06b96be7e6afda57ae6c934023866d1 Mon Sep 17 00:00:00 2001 From: jinyaqiu Date: Tue, 22 Jul 2025 14:32:44 +0800 Subject: [PATCH] =?UTF-8?q?feat:=20=E8=BD=AE=E6=92=AD=E5=9B=BE?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- app/(tabs)/owner.tsx | 4 +++- components/owner/carousel.tsx | 38 +++++++++++++++++------------------ components/owner/ranking.tsx | 2 +- components/owner/userName.tsx | 2 +- 4 files changed, 23 insertions(+), 23 deletions(-) diff --git a/app/(tabs)/owner.tsx b/app/(tabs)/owner.tsx index 818969f..2fecb5c 100644 --- a/app/(tabs)/owner.tsx +++ b/app/(tabs)/owner.tsx @@ -92,7 +92,9 @@ export default function OwnerPage() { {/* 分类 */} - + + + {/* 作品数据 */} diff --git a/components/owner/carousel.tsx b/components/owner/carousel.tsx index 0d0dd3f..9153bcc 100644 --- a/components/owner/carousel.tsx +++ b/components/owner/carousel.tsx @@ -3,10 +3,7 @@ import UserinfoTotalSvg from "@/assets/icons/svg/userinfoTotal.svg"; import { Counter, UserCountData } from "@/types/user"; import * as React from "react"; import { Dimensions, StyleSheet, View, ViewStyle } from "react-native"; -import { useSharedValue } from "react-native-reanimated"; -import Carousel, { - ICarouselInstance -} from "react-native-reanimated-carousel"; +import Carousel from "react-native-reanimated-carousel"; import { ThemedText } from "../ThemedText"; import { formatDuration } from "../utils/time"; import CategoryComponent from "./category"; @@ -23,9 +20,6 @@ const width = Dimensions.get("window").width; function CarouselComponent(props: Props) { const { data } = props; - - const ref = React.useRef(null); - const progress = useSharedValue(0); const [carouselDataValue, setCarouselDataValue] = React.useState([]); const dataHandle = () => { const carouselData = { ...data?.category_count, total_count: data?.total_count } @@ -56,8 +50,8 @@ function CarouselComponent(props: Props) { ))} - - + + } @@ -69,27 +63,30 @@ function CarouselComponent(props: Props) { }, [data]); return ( - + item?.key === 'total_count') - 1 || 0} + modeConfig={{ + parallaxScrollingScale: 1, + parallaxScrollingOffset: 180, + parallaxAdjacentItemScale: 0.7 + }} renderItem={({ item, index }) => { const style: ViewStyle = { - marginHorizontal: 10, - width: '92%', - height: '92%', + width: width, + height: width * 0.8, + alignItems: "center", }; return ( {item?.key === 'total_count' ? ( totleItem(item.value) ) : ( - + {CategoryComponent({ title: item?.key, data: [ @@ -116,12 +113,13 @@ const styles = StyleSheet.create({ borderRadius: 16, display: "flex", flexDirection: "column", - height: '100%', position: 'relative', + width: width * 0.6, + height: '85%' }, image: { position: 'absolute', - bottom: 0, + bottom: -10, right: 0, left: 0, width: '100%', diff --git a/components/owner/ranking.tsx b/components/owner/ranking.tsx index 89849c9..823d369 100644 --- a/components/owner/ranking.tsx +++ b/components/owner/ranking.tsx @@ -27,7 +27,7 @@ const Ranking = ({ data }: { data: TitleRankings[] }) => { renderItem={({ item }) => ( No.{item.ranking} - {item.display_name} + {item.display_name} {item.region} )} diff --git a/components/owner/userName.tsx b/components/owner/userName.tsx index cc83b8c..2225312 100644 --- a/components/owner/userName.tsx +++ b/components/owner/userName.tsx @@ -57,7 +57,7 @@ export default function UserInfo({ userInfo }: { userInfo: UserInfoDetails }) { - 3290 + {userInfo?.remain_points}