feat(profile): 在个人资料页面显示免费AI使用次数

This commit is contained in:
richarjiang
2025-10-16 17:17:36 +08:00
parent c6084fe702
commit 339c748a0f

View File

@@ -215,6 +215,14 @@ export default function PersonalScreen() {
{userProfile.memberNumber && ( {userProfile.memberNumber && (
<Text style={styles.userMemberNumber}>: {userProfile.memberNumber}</Text> <Text style={styles.userMemberNumber}>: {userProfile.memberNumber}</Text>
)} )}
{userProfile.freeUsageCount !== undefined && (
<View style={styles.aiUsageContainer}>
<Ionicons name="sparkles-outline" size={12} color="#9370DB" />
<Text style={styles.aiUsageText}>
AI次数: {userProfile.isVip ? '无限' : userProfile.freeUsageCount}
</Text>
</View>
)}
</View> </View>
{isLgAvaliable ? ( {isLgAvaliable ? (
<TouchableOpacity onPress={() => pushIfAuthedElseLogin('/profile/edit')}> <TouchableOpacity onPress={() => pushIfAuthedElseLogin('/profile/edit')}>
@@ -501,6 +509,17 @@ const styles = StyleSheet.create({
color: '#6C757D', color: '#6C757D',
marginTop: 4, marginTop: 4,
}, },
aiUsageContainer: {
flexDirection: 'row',
alignItems: 'center',
marginTop: 4,
},
aiUsageText: {
fontSize: 10,
color: '#9370DB',
marginLeft: 2,
fontWeight: '500',
},
editButton: { editButton: {
backgroundColor: '#9370DB', backgroundColor: '#9370DB',
paddingHorizontal: 16, paddingHorizontal: 16,