- {renderActionButton('create_elite_qr', 'primary')}
+
+ {renderActionButton('query_elite_status')}
+ {renderActionButton('create_elite_qr', 'primary')}
+
{`当前渠道:${goldRechargeChannelLabel}`}
{payAccountName}
)}
-
- {payUrl ? (
-
-
-
- ) : (
- 支付码生成中...
- )}
-
- {payTask.message || '请扫码支付'}
-
+ {paymentArrived(payTask) ? (
+ // 已到账/已开通:二维码不再有意义,留在弹窗里给结论 + 手动关闭
+
+
+
+
+ ) : ['failed', 'error', 'stopped'].includes(payTask.status) ? (
+
+
+
+
+ ) : (
+
+ {payUrl ? (
+
+
+
+ ) : (
+ 支付码生成中...
+ )}
+
+ {payTask.message || '请扫码支付'}
+
+ )}
)}
diff --git a/web/frontend/src/pages/douyu-tasks/config.tsx b/web/frontend/src/pages/douyu-tasks/config.tsx
index 2af4a6f..8f96ff2 100644
--- a/web/frontend/src/pages/douyu-tasks/config.tsx
+++ b/web/frontend/src/pages/douyu-tasks/config.tsx
@@ -30,6 +30,7 @@ export const TASK_STATUS_LABELS: Record = {
export const ELITE_QUICK_ACTIONS = [
{ key: 'get_bind_qr', icon: },
{ key: 'confirm_bind', icon: },
+ { key: 'query_elite_status', icon: },
{ key: 'create_elite_qr', icon: },
{ key: 'query_points', icon: },
{ key: 'query_game_name', icon: },
@@ -73,6 +74,7 @@ export const ELITE_TASK_TYPES = new Set([
'get_bind_qr',
'confirm_bind',
'create_elite_qr',
+ 'query_elite_status',
'create_gold_qr',
'donate_elite_gift',
'query_points',
@@ -154,6 +156,30 @@ export function taskQrUrl(task: DouyuTaskItem | null | undefined): string {
return '';
}
+// 任务已进终态后二维码不再有意义(支付已完成/已失败/已停止),列表里不再展示,
+// 避免大图弹窗关闭后只剩一个小图,看起来像"二维码变小了还能继续付"。
+const QR_TERMINAL_STATUSES = new Set(['success', 'failed', 'error', 'stopped']);
+
+export function activeTaskQrUrl(task: DouyuTaskItem | null | undefined): string {
+ if (!task || QR_TERMINAL_STATUSES.has(task.status)) return '';
+ return taskQrUrl(task);
+}
+
+// 精英宝典开通状态展示:积分区分不了"开通后积分花完"和"从未开通",
+// 以后端落库的 manualType(elite_opened)为准。
+export function eliteStatusText(
+ account: { elite_opened?: boolean | null; elite_expire_time?: number | null },
+): string {
+ if (account.elite_opened == null) return '';
+ if (!account.elite_opened) return '未开通';
+ const expire = account.elite_expire_time;
+ if (!expire || expire <= 0) return '已开通';
+ const at = new Date(expire * 1000);
+ if (Number.isNaN(at.getTime())) return '已开通';
+ const pad = (n: number) => String(n).padStart(2, '0');
+ return `已开通 ${at.getFullYear()}-${pad(at.getMonth() + 1)}-${pad(at.getDate())} 到期`;
+}
+
export function bindReadyForConfirm(task: DouyuTaskItem | null | undefined): boolean {
if (!task) return false;
if (task.task_type === 'get_xpd_bind_qr') {