|
@@ -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 }
|