fix: bug
This commit is contained in:
parent
ea53d8d70e
commit
17d0cfa54e
|
|
@ -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) => (
|
||||
|
|
|
|||
Loading…
Reference in New Issue