Browse Source

🐞 fix: 扩大单词乐跑限制距离

Pchen. 1 month ago
parent
commit
c3f045e002
1 changed files with 4 additions and 4 deletions
  1. 4 4
      plugin/jkes/monthPolicy.js

+ 4 - 4
plugin/jkes/monthPolicy.js

@@ -184,12 +184,12 @@ async function planJkesAutoRun(account, autoDayRaw, token, options = {}, d = new
 }
 }
 
 
 /**
 /**
- * 手动发起:不校验星期;单次 distanceKm 为 1–5。本月已跑里程不设上限(30km 仅为学校最低要求参考)。
+ * 手动发起:不校验星期;单次 distanceKm 为 0.5–10。本月已跑里程不设上限(30km 仅为学校最低要求参考)。
  */
  */
-async function planJkesManualRun(account, token, distanceKm = 1, d = new Date()) {
+async function planJkesManualRun(account, token, distanceKm = 0.5, d = new Date()) {
     const kmReq = Number(distanceKm)
     const kmReq = Number(distanceKm)
-    if (!Number.isFinite(kmReq) || kmReq < 1 || kmReq > 5) {
-        return { run: false, reason: '单次距离需在 1–5 公里' }
+    if (!Number.isFinite(kmReq) || kmReq < 0.5 || kmReq > 10) {
+        return { run: false, reason: '单次距离需在 0.5–10 公里' }
     }
     }
     await refreshMonthKmFromApi(account, token, d)
     await refreshMonthKmFromApi(account, token, d)
     return { run: true, targetKm: Math.round(kmReq * 1000) / 1000 }
     return { run: true, targetKm: Math.round(kmReq * 1000) / 1000 }