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