diff --git a/src/app/pay/page.tsx b/src/app/pay/page.tsx index 0e1c4cb..a7b4184 100644 --- a/src/app/pay/page.tsx +++ b/src/app/pay/page.tsx @@ -130,6 +130,8 @@ function PayContent() { const hasChannels = channels.length > 0; // 是否有可售卖套餐 const hasPlans = plans.length > 0; + // 是否可以充值(未禁用且有支付方式) + const canTopUp = !balanceDisabled && config.enabledPaymentTypes.length > 0; useEffect(() => { if (typeof window === 'undefined') return; @@ -467,8 +469,8 @@ function PayContent() { }; // ── 渲染 ── - // R7: 检查是否所有入口都关闭 - const allEntriesClosed = channelsLoaded && balanceDisabled && !hasPlans; + // R7: 检查是否所有入口都关闭(无可用充值方式 且 无订阅套餐) + const allEntriesClosed = channelsLoaded && !canTopUp && !hasPlans; const showMainTabs = channelsLoaded && !allEntriesClosed && (hasChannels || hasPlans); const pageTitle = showMainTabs ? pickLocaleText(locale, '选择适合你的 订阅套餐', 'Choose Your Plan') @@ -595,7 +597,7 @@ function PayContent() {

- {pickLocaleText(locale, '充值/订阅入口已被管理员关闭', 'Recharge / Subscription entry has been closed by admin')} + {pickLocaleText(locale, '充值/订阅 入口未开放', 'Recharge / Subscription entry is not available')}

{pickLocaleText(locale, '如有疑问,请联系管理员', 'Please contact the administrator if you have questions')} @@ -606,9 +608,9 @@ function PayContent() { {/* ── 有渠道配置:新版UI ── */} {channelsLoaded && showMainTabs && (activeMobileTab === 'pay' || !isMobile) && !selectedPlan && !showTopUpForm && ( <> - + - {mainTab === 'topup' && !balanceDisabled && ( + {mainTab === 'topup' && canTopUp && (

{/* 按量付费说明 banner */}
0 && !selectedPlan && ( + {channelsLoaded && !showMainTabs && canTopUp && !selectedPlan && ( <> {isMobile ? ( activeMobileTab === 'pay' ? (