diff --git a/app/(tabs)/owner.tsx b/app/(tabs)/owner.tsx
index 0281b91..7258872 100644
--- a/app/(tabs)/owner.tsx
+++ b/app/(tabs)/owner.tsx
@@ -13,13 +13,14 @@ import { CountData, UserInfoDetails } from '@/types/user';
import { useFocusEffect, useRouter } from 'expo-router';
import { useCallback, useEffect, useState } from 'react';
import { useTranslation } from 'react-i18next';
-import { FlatList, StyleSheet, View } from 'react-native';
+import { Dimensions, FlatList, StyleSheet, View } from 'react-native';
import { useSafeAreaInsets } from "react-native-safe-area-context";
export default function OwnerPage() {
const insets = useSafeAreaInsets();
const { t } = useTranslation();
const router = useRouter();
+ const width = Dimensions.get("window").width;
// 添加页面挂载状态
const [isMounted, setIsMounted] = useState(false);
@@ -122,7 +123,7 @@ export default function OwnerPage() {
{/* 分类 */}
-
+
diff --git a/components/owner/carousel.tsx b/components/owner/carousel.tsx
index 6d21d82..6b5aca4 100644
--- a/components/owner/carousel.tsx
+++ b/components/owner/carousel.tsx
@@ -75,7 +75,7 @@ function CarouselComponent(props: Props) {
}}>
setCurrentIndex(index)}
@@ -89,16 +89,14 @@ function CarouselComponent(props: Props) {
}
modeConfig={{
parallaxScrollingScale: 1,
- parallaxScrollingOffset: 140,
+ parallaxScrollingOffset: 130,
parallaxAdjacentItemScale: 0.7
}}
renderItem={({ item, index }) => {
- const isActive = index === currentIndex;
const style: ViewStyle = {
width: width,
- height: width * 0.8,
- alignItems: "center",
- // paddingTop: isActive && item?.key === 'total_count' ? 0 : 40
+ height: width * 0.7,
+ alignItems: "center"
};
return (
diff --git a/components/owner/category.tsx b/components/owner/category.tsx
index fdefbb6..e1e7fb5 100644
--- a/components/owner/category.tsx
+++ b/components/owner/category.tsx
@@ -44,7 +44,7 @@ const CategoryComponent = ({ title, data, bgSvg, style, width }: CategoryProps)
};
return (
-
+
{item.title}
-
+
{item?.title === "Length" ? (
typeof item.number === 'object' ? (
renderTimeDisplay(item.number)
@@ -110,6 +110,7 @@ const styles = StyleSheet.create({
},
content: {
padding: 32,
+ paddingRight: 16,
justifyContent: "space-between",
flex: 1
},
@@ -136,7 +137,7 @@ const styles = StyleSheet.create({
flexDirection: 'row',
alignItems: 'center',
justifyContent: 'space-between',
- paddingVertical: 8,
+ paddingVertical: 16,
width: '100%',
},
itemTitle: {
@@ -152,7 +153,6 @@ const styles = StyleSheet.create({
lineHeight: 30,
fontWeight: '700',
textAlign: 'left',
- marginLeft: 8,
flex: 1,
}
});