解决报名支付
All checks were successful
Deploy to Server / deploy (push) Successful in 36s

This commit is contained in:
jeremygan2021
2026-02-23 16:31:34 +08:00
parent 58176c6651
commit 799965ee74
7 changed files with 87 additions and 38 deletions

View File

@@ -148,12 +148,13 @@ const ActivityDetail = () => {
const hasConfirmed = activity.has_signed_up
const isPending = activity.my_signup_status === 'pending'
const isUnpaid = activity.my_signup_status === 'unpaid'
const isPaid = activity.is_paid
const canSignup = activity.is_active && !isEnded &&
(
(!hasConfirmed && !isPending && !isFull) ||
(isPending && isPaid)
(!hasConfirmed && !isPending && !isUnpaid && !isFull) ||
(isUnpaid && isPaid)
)
return (
@@ -233,9 +234,11 @@ const ActivityDetail = () => {
>
{submitting ? '提交中...' : (
hasConfirmed ? '您已报名' : (
isPending ? (isPaid ? '去支付' : '审核中') : (
isEnded ? '活动已结束' : (
isFull ? '名额已满' : '立即报名'
isPending ? '审核中' : (
isUnpaid ? '去支付' : (
isEnded ? '活动已结束' : (
isFull ? '名额已满' : '立即报名'
)
)
)
)