This commit is contained in:
imeepos 2026-01-28 14:49:56 +08:00
parent ea53d8d70e
commit 17d0cfa54e
1 changed files with 4 additions and 2 deletions

View File

@ -163,8 +163,8 @@ export default function MembershipScreen() {
const currentPlan = selectedPlan
// 计算进度条百分比:当前计划积分 / 最高计划积分
const maxPoints = Math.max(...plans.map(plan => plan.points))
const progressPercentage = (currentPlan?.points / maxPoints) * 100
const maxPoints = plans.length > 0 ? Math.max(...plans.map(plan => plan.points)) : 1
const progressPercentage = currentPlan?.points ? (currentPlan.points / maxPoints) * 100 : 0
// 加载状态
if (isStripePricingLoading || creditPlans.length === 0) {
@ -252,6 +252,8 @@ export default function MembershipScreen() {
loop
onSnapToItem={(index) => setCurrentImageIndex(index)}
enabled={false}
windowSize={1}
mode="parallax"
/>
<View style={styles.dotsContainer}>
{carouselImages.map((_, index) => (