feat(gui): 对接 /api/expedition/auto_check,挂机时自动领奖励与智能维修#9
Open
feat(gui): 对接 /api/expedition/auto_check,挂机时自动领奖励与智能维修#9
Conversation
- 仅在前端 Scheduler 的自动远征检查(挂机模式)中,后续追加任务奖励领取与浴室维修 - 手动点击'收取远征'按钮不受影响 - 执行浴室维修前,先查询后端 taskStatus;若有战斗任务 running,则跳过维修并记录日志,避免占用舰队
26d98d7 to
9278306
Compare
- ApiClient 新增 expeditionAutoCheck 方法 - Scheduler.start() 和 consumeNext() 中的远征检查均改调新端点 - 移除前端手动串调 rewardCollect / repairBath 的逻辑,统一由后端处理
9278306 to
0bc7f2c
Compare
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Closes #8
实现方式
model/ApiClient.ts新增expeditionAutoCheck()方法,对接后端新增的POST /api/expedition/auto_check挂机专用端点model/scheduler/Scheduler.ts中两处自动远征检查(start()启动后检查、consumeNext()定时器触发)均改调expeditionAutoCheck()rewardCollect()和repairBath()的逻辑,统一由后端在auto_check中处理奖励领取与智能浴室维修效果
ctx.active_fight_tasks判断,战斗中会自动跳过浴室维修,避免占用舰队