feat(douyu-pool): 完善微信扫码支付与任务闭环及常用快捷选择
- 前端在扫码支付弹窗中增加显眼充值金额卡片与多账号 Tabs 支付标注 - 前端增加常用与历史快捷皮肤选择胶囊栏,支持本地缓存记忆与一键切换 - 后端补给链首步引入 query_elite_status 并支持 require_opened 前置熔断校验 - 优化供给与预估花费文案展示,增加兑换结果大图预览与凭证复制功能 - 验证方式:全量 784 个 pytest 用例全部通过,前端 tsc/build 校验通过
This commit is contained in:
@@ -208,8 +208,8 @@ class TestExchange(_ApiBase):
|
||||
assert result.allocated == 1
|
||||
tasks = self.session.query(DouyuTask).order_by(DouyuTask.id.asc()).all()
|
||||
assert [t.task_type for t in tasks] == [
|
||||
"query_elite_status",
|
||||
"query_gold_balance",
|
||||
"query_points",
|
||||
"create_gold_qr",
|
||||
"donate_elite_gift",
|
||||
"exchange_goods",
|
||||
|
||||
@@ -28,12 +28,13 @@ class TestBuildSupplyChain:
|
||||
assert chain[0].payload == {"commodity_id": "C1", "num": 1}
|
||||
|
||||
def test_tier_b_refreshes_before_spending(self):
|
||||
"""链首必须先刷余额 —— 否则 `_skip_when` 读的是旧值,会多充钱。"""
|
||||
"""链首必须先查开通状态与余额 —— 否则未开通会误充值,旧值会多充钱。"""
|
||||
chain = pool.build_supply_chain(self._candidate(300), commodity_id="C1")
|
||||
assert [s.task_type for s in chain][:2] == [
|
||||
"query_elite_status",
|
||||
"query_gold_balance",
|
||||
"query_points",
|
||||
]
|
||||
assert chain[0].payload == {"require_opened": True}
|
||||
|
||||
def test_tier_b_topup_amount_is_exact_gap(self):
|
||||
# 缺口 980 分 → 98 个令 → 98 元
|
||||
|
||||
Reference in New Issue
Block a user