feat(douyu-pool): 完善微信扫码支付与任务闭环及常用快捷选择
- 前端在扫码支付弹窗中增加显眼充值金额卡片与多账号 Tabs 支付标注 - 前端增加常用与历史快捷皮肤选择胶囊栏,支持本地缓存记忆与一键切换 - 后端补给链首步引入 query_elite_status 并支持 require_opened 前置熔断校验 - 优化供给与预估花费文案展示,增加兑换结果大图预览与凭证复制功能 - 验证方式:全量 784 个 pytest 用例全部通过,前端 tsc/build 校验通过
This commit is contained in:
@@ -635,9 +635,15 @@ def build_supply_chain(
|
||||
)
|
||||
]
|
||||
|
||||
# 检查手册开通状态与最新积分
|
||||
status_step = (
|
||||
SupplyStep("query_elite_status", {"require_opened": True})
|
||||
if exchange_task_type == "exchange_goods"
|
||||
else SupplyStep("query_points", {})
|
||||
)
|
||||
steps: list[SupplyStep] = [
|
||||
status_step,
|
||||
SupplyStep("query_gold_balance", {}),
|
||||
SupplyStep("query_points", {}),
|
||||
]
|
||||
# 充值:余额够就跳过(闸门在执行时求值,读的是刚刷新过的账号字段)
|
||||
for amount in recharge_amounts_for(candidate.topup_gifts):
|
||||
|
||||
@@ -117,6 +117,16 @@ class ManualMixin:
|
||||
state = "已开通" if result["elite_opened"] else "未开通"
|
||||
expire_text = self._format_expire_text(result["elite_expire_time"])
|
||||
points = result["elite_manual_score"]
|
||||
payload = self._task_payload(task)
|
||||
if payload.get("require_opened") and not result["elite_opened"]:
|
||||
self._mark_task(
|
||||
db,
|
||||
task,
|
||||
"failed",
|
||||
"精英宝典未开通,无法继续充值或兑换,请先开通手册",
|
||||
result,
|
||||
)
|
||||
return
|
||||
self._mark_task(
|
||||
db,
|
||||
task,
|
||||
|
||||
Reference in New Issue
Block a user