feat: 调整高价值福袋参与阈值,优化预约逻辑以提升用户体验

This commit is contained in:
Your Name committed 2026-01-17 09:26:41 +08:00
1 parent 1283645b75
commit 3fbd2b2d85
3 files changed
+14 -12

No files matched your search

+3 -3
View File
@@ -189,7 +189,7 @@ class fudai_analyse:
# 高价值阈值(元)
self.high_value_fudai_threshold_yuan: float = 500.0
# 提前参与秒数:开奖前 N 秒回到该直播间并参与
self.high_value_fudai_join_ahead_seconds: int = 300
self.high_value_fudai_join_ahead_seconds: int = 100
# 从当前位置最多回滑多少次以回到预约直播间
self.high_value_fudai_max_swipe_back: int = 35
# 同时记录的最大预约数量
@@ -2994,7 +2994,7 @@ class fudai_analyse:
# 获取"预约参与阈值"配置
join_ahead_seconds = int(
getattr(
self, "high_value_fudai_join_ahead_seconds", 300
self, "high_value_fudai_join_ahead_seconds", 100
)
or 120
)
@@ -3895,7 +3895,7 @@ class fudai_analyse:
if ft > 0:
join_ahead = float(
getattr(
self, "high_value_fudai_join_ahead_seconds", 300
self, "high_value_fudai_join_ahead_seconds", 100
)
or 120
)
+6 -6
View File
@@ -4862,10 +4862,10 @@ def basic_join_decision(
# 获取"预约参与阈值"配置
try:
join_ahead_seconds = int(
getattr(analyser, "high_value_fudai_join_ahead_seconds", 120) or 120
getattr(analyser, "high_value_fudai_join_ahead_seconds", 100) or 100
)
except Exception:
join_ahead_seconds = 120
join_ahead_seconds = 100
# 如果剩余秒数在"预约参与阈值"内,则立即参与而不是预约
if remain_seconds is not None and remain_seconds <= join_ahead_seconds:
@@ -5118,10 +5118,10 @@ def basic_join_decision(
# 如果剩余秒数 <= 这个阈值,立即参与;否则记录预约
try:
join_ahead_seconds = int(
getattr(analyser, "high_value_fudai_join_ahead_seconds", 120) or 120
getattr(analyser, "high_value_fudai_join_ahead_seconds", 100) or 100
)
except Exception:
join_ahead_seconds = 120
join_ahead_seconds = 100
# 如果剩余秒数在"预约参与阈值"内(<= 阈值),立即参与而不是记录预约
if remain_seconds is not None and remain_seconds <= join_ahead_seconds:
@@ -6007,7 +6007,7 @@ def basic_join_decision(
"basic_join_decision完成(记录预约)",
elapsed_seconds=round(elapsed, 2),
)
# 记录预约后关闭详情页,避免影响后续预约回退
try:
analyser.click(500, 470)
@@ -6024,7 +6024,7 @@ def basic_join_decision(
)
except Exception:
pass
return True
except Exception:
# 若预约逻辑异常,退化为直接参与抽奖
@@ -1089,7 +1089,9 @@ def process_reservation_attend_window(
# 用于锁定期判断/匹配的轮询提前量(允许为 0,禁止为负数)
try:
poll_before = 0.0
poll_before = float(
getattr(analyser, "high_value_fudai_poll_before_seconds", 10.0) or 10.0
)
except Exception:
poll_before = 10.0
poll_before = max(0.0, poll_before)
@@ -1335,10 +1337,10 @@ def process_reservation_attend_window(
# 仅在"即将开奖窗口"(包括已过一小段时间)内才触发回退
try:
join_ahead = float(
getattr(analyser, "high_value_fudai_join_ahead_seconds", 120) or 120
getattr(analyser, "high_value_fudai_join_ahead_seconds", 100) or 100
)
except Exception:
join_ahead = 120.0
join_ahead = 100.0
# poll_before 已在函数前部统一计算