js薄荷修点bug (#750)

* Delete repo/js/Tool_mint/settings.json

* Delete repo/js/Tool_mint/main.js

* Add files via upload
This commit is contained in:
Tooltingsu
2025-05-09 16:46:27 +08:00
committed by GitHub
parent 7a3f59f0ed
commit d35296ba7f
2 changed files with 25 additions and 13 deletions

View File

@@ -5,17 +5,29 @@ const MintRo = RecognitionObject.TemplateMatch(file.ReadImageMatSync("assets/Rec
(async function main() {
// 从设置文件中读取用户配置
const targetMintCount = parseInt(settings.targetMintCount);
let targetMintCount = parseInt(settings.targetMintCount);
if (isNaN(targetMintCount) || targetMintCount <= 0) {
if (settings.targetMintCount === undefined || settings.targetMintCount === "") {
targetMintCount = 9999;
log.info("目标薄荷数量未设置使用默认值9999");
} else {
notification.error("请输入有效的目标薄荷数量(正整数)");
return;
}
}
const isRefresh = settings.isRefresh;
const executionTime = parseInt(settings.executionTime);
let executionTime = parseInt(settings.executionTime);
if (isNaN(executionTime) || executionTime <= 0) {
if (settings.executionTime === undefined || settings.executionTime === "") {
executionTime = 9999;
log.info("执行时间未设置使用默认值9999分钟");
} else {
notification.error("请输入有效的执行时间(正整数,单位:分钟)");
return;
}
}
// 定义地图路线顺序的任务数据从薄荷表格的sheet5获取整理
const mapOrderTasks = [

View File

@@ -2,7 +2,7 @@
{
"name": "targetMintCount",
"type": "input-text",
"label": "目标薄荷采集数量"
"label": "目标薄荷采集数量空则默认9999"
},
{
"name": "isRefresh",
@@ -12,6 +12,6 @@
{
"name": "executionTime",
"type": "input-text",
"label": "行时间(单位:分钟)"
"label": "行时间(单位:分钟)空则默认9999"
}
]