feat: 优化

This commit is contained in:
jinyaqiu 2025-07-31 19:40:28 +08:00
parent 9efa6e7505
commit 1941790a05
7 changed files with 52 additions and 27 deletions

View File

@ -80,24 +80,11 @@ export default function OwnerPage() {
{/* 用户信息 */}
<UserInfo userInfo={userInfoDetails} />
{/* 资源数据 */}
{/* <TouchableOpacity
onPress={() => router.push({
pathname: '/rights',
params: { credit: userInfoDetails?.remain_points, pro: userInfoDetails?.membership_level }
})}
style={styles.resourceContainer}
>
<View style={{ gap: 4 }}>
<ThemedText style={styles.text}>{t("generalSetting.premium", { ns: "personal" })}</ThemedText>
<ThemedText style={styles.secondText}>{t("generalSetting.unlock", { ns: "personal" })}</ThemedText>
</View>
<ComeinSvg width={24} height={24} />
</TouchableOpacity> */}
<MemberCard />
{/* 会员卡 */}
<MemberCard pro={userInfoDetails?.membership_level} />
{/* 分类 */}
<View style={{ marginHorizontal: -16 }}>
<View style={{ marginHorizontal: -16, marginBottom: -16 }}>
<CarouselComponent data={userInfoDetails?.material_counter} />
</View>

View File

@ -150,7 +150,7 @@ const styles = StyleSheet.create({
number: {
color: "#fff",
fontWeight: "700",
fontSize: 28,
fontSize: 26,
textAlign: 'left',
flex: 1,
paddingTop: 8

View File

@ -22,7 +22,7 @@ const CategoryComponent = ({ title, data, bgSvg, style }: CategoryProps) => {
style={{
width: "100%",
height: "100%",
resizeMode: "cover"
resizeMode: "cover",
}}
/>
<BlurView intensity={10} style={styles.overlay} />

View File

@ -1,26 +1,60 @@
import HandersSvg from '@/assets/icons/svg/handers.svg';
import ProSvg from '@/assets/icons/svg/pro.svg';
import { ThemedText } from '@/components/ThemedText';
import { useRouter } from 'expo-router';
import { useTranslation } from "react-i18next";
import { Dimensions, Image, StyleSheet, View } from "react-native";
import { Dimensions, Image, StyleSheet, TouchableOpacity, View } from "react-native";
const MemberCard = () => {
const MemberCard = ({ pro }: { pro: string }) => {
const { t } = useTranslation();
const proPng = require("@/assets/images/png/owner/pro.png");
const width = Dimensions.get("window").width;
const router = useRouter();
return (
<View style={styles.container}>
<Image source={proPng} style={{ width: 330, height: 110, position: "absolute", left: width * 0.5 - 40, bottom: 0, zIndex: 9 }} />
<ProSvg width={"100%"} height={"100%"} style={{ backgroundColor: '#4C320C', borderRadius: 32 }} />
<HandersSvg style={{ position: "absolute", left: width * 0.5 + 5, bottom: -3, zIndex: 10 }} />
<View style={styles.dateContainer}>
<Image source={proPng} style={{ opacity: pro === "Pro" ? 1 : 0.5, width: 330, height: 110, position: "absolute", left: width * 0.5 - 40, bottom: 0, zIndex: 9 }} />
<ProSvg width={"100%"} height={"100%"} style={{ opacity: pro === "Pro" ? 1 : 0.5, backgroundColor: '#4C320C', borderRadius: 32 }} />
<HandersSvg style={{ opacity: pro === "Pro" ? 1 : 0.5, position: "absolute", left: width * 0.5 + 5, bottom: -3, zIndex: 10 }} />
<View style={[styles.dateContainer, { opacity: pro === "Pro" ? 1 : 0.5 }]}>
<ThemedText style={styles.date}>2025-09-05</ThemedText>
</View>
{
pro === "Pro"
?
null :
<TouchableOpacity
onPress={() => {
router.push('/rights');
}}
activeOpacity={0.7}
hitSlop={{ top: 10, bottom: 10, left: 10, right: 10 }}
style={styles.proText}
>
<ThemedText >{t("personal:generalSetting.goPremium")}</ThemedText>
</TouchableOpacity>
}
</View>
);
};
const styles = StyleSheet.create({
proText: {
fontSize: 10,
fontWeight: 'bold',
color: '#4C320C',
padding: 4,
paddingHorizontal: 8,
borderRadius: 16,
backgroundColor: '#fff',
position: 'absolute',
top: 30,
left: 90,
opacity: 0.7
},
dateContainer: {
position: 'absolute',
top: 16,

View File

@ -90,7 +90,8 @@ export default function UserInfo({ userInfo }: { userInfo: UserInfoDetails }) {
}}
activeOpacity={0.7}
hitSlop={{ top: 10, bottom: 10, left: 10, right: 10 }}
style={styles.text}>
style={styles.text}
>
<SettingSvg />
</TouchableOpacity>
</View>

View File

@ -87,7 +87,9 @@
"premium": "Upgrade to Premium",
"unlock": "Unlock more memory magic",
"delete": "Are you sure you want to delete your account?",
"cancel": "Cancel"
"cancel": "Cancel",
"pro": "Pro",
"goPremium": "开通会员"
},
"rights": {
"title": "Subscription",

View File

@ -88,7 +88,8 @@
"unlock": "解锁更多记忆魔法",
"delete": "确定要注销账号吗?",
"cancel": "取消",
"pro": "Pro"
"pro": "Pro",
"goPremium": "开通会员"
},
"rights": {
"title": "权益",