优化
This commit is contained in:
@ -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;
|
||||
}
|
||||
|
Reference in New Issue
Block a user