This commit is contained in:
wisz2021
2021-06-08 15:46:38 +08:00
parent 84818fef74
commit 6a72b9cfa0

View File

@ -87,6 +87,7 @@ if ($.isNode()) {
})
async function pasture() {
try {
$.homeInfo = {};
$.petidList = [];
$.crowInfo = {};
@ -196,6 +197,9 @@ async function pasture() {
}
}
}
} catch (e) {
$.logErr(e)
}
}
async function doTask() {
@ -356,11 +360,11 @@ function dealReturn(type, data) {
data = JSON.parse(data.match(new RegExp(/jsonpCBK.?\((.*);*/))[1]);
if (data.ret === 0) {
console.log(`投喂成功`);
} else if (data.ret === 2020 && data.data.maintaskId === 'pause') {
} else if (data.ret === 2020) {
console.log(`投喂失败,需要先收取鸡蛋`);
$.pause = true;
} else {
console.log(`投喂失败,未知错误`);
console.log(`投喂失败,${data.message}`);
console.log(JSON.stringify(data));
$.runFeed = false;
}