feat: Add runtime overrides for reservation settings and update high value rooms

- Introduced new command-line arguments for runtime configuration:
  - `--reservation-back-swipe-delay`: Adjusts swipe delay after rollback (only effective when rollback verification is disabled).
  - `--reservation-preempt-min-value`: Sets the minimum value for preempting reservations.
  - `--fudai-find-max-attempts`: Limits the maximum attempts to find the 福袋 icon.

- Updated `high_value_rooms.json` to reflect new room entries and updated timestamps.
- Modified `reservations.json` to change the current reservation details and added a new reservation entry.
- Enhanced `web_gui.py` to support new runtime parameters from the GUI.
- Updated `app.js` and `index.html` in the web UI to include new settings for 福袋 attempts, reservation preemption value, and swipe delay.
This commit is contained in:
Your Name committed 2025-12-15 20:31:41 +08:00
1 parent 02b2930639
commit ea8d221543
8 files changed
+531 -335

No files matched your search

+20
View File
@@ -64,6 +64,9 @@ def parse_args(argv: list[str]) -> argparse.Namespace:
p.add_argument("--high-value-room-revisit-only-current-run", action="store_true", help="仅回访本次运行记录的高价值直播间")
p.add_argument("--reservation-back-verify-enabled", action="store_true", help="启用回退后预约校验(默认启用)")
p.add_argument("--reservation-back-verify-disabled", action="store_true", help="禁用回退后预约校验")
p.add_argument("--reservation-back-swipe-delay", type=float, default=None, help="运行时覆盖:回退后滑动等待(秒),仅在未启用回退校验时生效,可加快回退速度")
p.add_argument("--reservation-preempt-min-value", type=float, default=None, help="运行时覆盖:预约抢占最小价值(元),低于该值的预约不会抢占当前任务")
p.add_argument("--fudai-find-max-attempts", type=int, default=None, help="运行时覆盖:找福袋图标最多尝试次数(整数)")
# 按需求:删除“自动养号/随机等待/轻微扰动”等参数,仅保留“推荐页养号流程”。
# 推荐页养号的动作/概率/阈值等由 config.json 控制(GUI 会保存)。
@@ -194,6 +197,23 @@ def main(argv: list[str]) -> int:
analyser.reservation_back_verify_enabled = True
if getattr(args, "reservation_back_verify_disabled", False):
analyser.reservation_back_verify_enabled = False
# 运行时覆盖:回退后滑动等待(快速值,仅在未启用回退校验时使用)
if getattr(args, "reservation_back_swipe_delay", None) is not None:
try:
analyser.reservation_back_swipe_delay_fast_seconds = float(args.reservation_back_swipe_delay)
except Exception:
pass
if getattr(args, "reservation_preempt_min_value", None) is not None:
try:
analyser.reservation_preempt_min_value_yuan = max(0.0, float(args.reservation_preempt_min_value))
except Exception:
pass
# 运行时覆盖:找福袋最大尝试次数
if getattr(args, "fudai_find_max_attempts", None) is not None:
try:
analyser.fudai_find_max_attempts = max(1, int(args.fudai_find_max_attempts))
except Exception:
pass
device_id = args.device_id.strip() if args.device_id else ""
if not device_id: