修复(充值弹层): 当前档位缺失时禁用会员下单
- resolveMembershipPlanAction 在有效会员查不到当前档位时返回「套餐信息缺失」并禁用,避免误判为新客对所有档位开放购买
This commit is contained in:
@@ -392,9 +392,13 @@ function resolveMembershipPlanAction(
|
||||
): MembershipPlanAction {
|
||||
const isActive =
|
||||
membership?.status === 'active' && membership.plan !== 'normal';
|
||||
if (!isActive || !membership || !currentPlan) {
|
||||
if (!isActive || !membership) {
|
||||
return { disabled: false, label: '开通会员', mode: 'purchase' };
|
||||
}
|
||||
// 有效会员但目录里查不到当前档位:无法判定升降档,禁用下单而不是退化成「新购」。
|
||||
if (!currentPlan) {
|
||||
return { disabled: true, label: '套餐信息缺失', mode: 'purchase' };
|
||||
}
|
||||
if (plan.plan === membership.plan) {
|
||||
return { disabled: true, label: '当前套餐', mode: 'purchase' };
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user