From 29e51a81bb28f679e97ae9ac203889ac1f932330 Mon Sep 17 00:00:00 2001 From: yan Date: Sun, 15 Feb 2026 17:40:24 +0800 Subject: [PATCH] =?UTF-8?q?fix(AutoPlanDomain):=20=E4=BF=AE=E5=A4=8D?= =?UTF-8?q?=E7=89=A9=E7=90=86=E5=9F=9F=E8=BF=87=E6=BB=A4=E5=92=8C=E5=91=A8?= =?UTF-8?q?=E6=97=A5=E9=80=89=E6=8B=A9=E5=80=BC=E5=A4=84=E7=90=86=E9=80=BB?= =?UTF-8?q?=E8=BE=91?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit - 修复了原粹树脂过滤条件中的多余空格问题 - 统一了过滤器链中的空格格式 - 添加了周日选择值的空值检查,避免未定义值的赋值 - 将周日选择值转换为字符串类型以确保数据一致性 - 优化了条件赋值逻辑,提高代码健壮性 --- repo/js/AutoPlanDomain/main.js | 10 ++++++---- 1 file changed, 6 insertions(+), 4 deletions(-) diff --git a/repo/js/AutoPlanDomain/main.js b/repo/js/AutoPlanDomain/main.js index 808ca876d..1a02d34ed 100644 --- a/repo/js/AutoPlanDomain/main.js +++ b/repo/js/AutoPlanDomain/main.js @@ -30,10 +30,10 @@ async function autoDomain(autoFight) { physical_domain.sort((a, b) => a.order - b.order) // 不包含原粹树脂的和 const noOriginalSum = physical_domain.filter(item => item.name.trim() !== "原粹树脂") - .filter(item => item.open ).length;//求和 + .filter(item => item.open).length;//求和 // 只包含原粹树脂的和 const originalSum = physical_domain.filter(item => item.name?.trim() === "原粹树脂") - .filter(item => item.open ).length; + .filter(item => item.open).length; const resinPriorityList = physical_domain.filter(item => item.open).map(item => item.name?.trim()) // /** 树脂使用优先级列表 */ // resinPriorityList: string[]; @@ -73,8 +73,10 @@ async function autoDomain(autoFight) { domainParam.PartyName = autoFight.partyName || domainParam.PartyName; log.debug(`队伍名称:${domainParam.PartyName}`) - //周日|限时选择的值 - domainParam.SundaySelectedValue = autoFight.sundaySelectedValue || domainParam.SundaySelectedValue; + if (autoFight.sundaySelectedValue) { + //周日|限时选择的值 + domainParam.SundaySelectedValue = "" + (autoFight.sundaySelectedValue || domainParam.SundaySelectedValue); + } log.debug(`周日|限时选择的值:${domainParam.SundaySelectedValue}`) //副本轮数 try {