feat(douyu): 兑换图片默认隐藏 + 供应商直充默认上限800
- 兑换图片仅显示本页面本次发起过兑换的账号,历史截图默认不展示 - douyu_config 增加 gold_api_max_amount,默认800 - 配置弹窗可修改,输入框按上限 clamp,执行器下单前再校验 - 新增迁移0130,补充配置/超限测试
This commit is contained in:
@@ -575,6 +575,11 @@ class GoldMixin:
|
||||
amount: int,
|
||||
) -> None:
|
||||
"""创建供应商鱼翅直充订单并轮询订单状态。"""
|
||||
max_amount = int(config.get("gold_api_max_amount") or 800)
|
||||
if amount > max_amount:
|
||||
raise FishFinRechargeError(
|
||||
f"单笔供应商直充不能超过 {max_amount} 鱼翅(当前 {amount})"
|
||||
)
|
||||
product_id = str(config.get("gold_api_product_id") or "").strip()
|
||||
template_name = str(
|
||||
config.get("gold_api_account_template_name") or "斗鱼昵称"
|
||||
|
||||
@@ -134,6 +134,7 @@ DOUYU_CONFIG_DEFAULTS = {
|
||||
"gold_api_product_id": "111570",
|
||||
"gold_api_account_template_name": "斗鱼昵称",
|
||||
"recharge_duplicate_confirm_minutes": 10,
|
||||
"gold_api_max_amount": 800,
|
||||
"gift_id": "23643",
|
||||
"skin_id": "2942",
|
||||
# 和平小店总开关,默认关(小店当前关闭;关着时一键查询完全跳过它的请求)
|
||||
|
||||
Reference in New Issue
Block a user