some changes
- check all configs - log when response data is null instead of crashing
This commit is contained in:
parent
eea36a2fa1
commit
47fe03e978
@ -87,14 +87,13 @@ exports.checkConfigs = function(configs){
|
||||
if(configThis[configKeys[key]] == "" || configThis[configKeys[key]] == undefined || configThis[configKeys[key]] == null || configThis[configKeys[key]] == NaN) {
|
||||
log.error(`配置文件 ${file} 异常:`);
|
||||
log.error(` —— ${configKeys[key]}字段缺失`);
|
||||
isNoProbem = false;
|
||||
break;
|
||||
// isNoProbem = false;
|
||||
}
|
||||
}
|
||||
|
||||
if(!isNoProbem) {
|
||||
exit();
|
||||
}
|
||||
// if(!isNoProbem) {
|
||||
// exit();
|
||||
// }
|
||||
}
|
||||
}
|
||||
|
||||
|
4
index.js
4
index.js
@ -59,6 +59,7 @@ for(key in configs) {
|
||||
logContent += `<span style="color: orange">${key} Wallet返回体 <br> ${JSON.stringify(WalletRespond)}</span><br>`;
|
||||
var NotificationRespond = Notification(makeHeader(configs[key]));
|
||||
logContent += `<span style="color: orange">${key} Notification返回体 <br> ${JSON.stringify(NotificationRespond)}</span><br>`;
|
||||
if(WalletRespond.data != null) {
|
||||
if(WalletRespond.data.free_time.free_time != undefined) {
|
||||
successNum ++;
|
||||
log.info(`签到完毕! 剩余时长:${WalletRespond.data.free_time.free_time}分钟`)
|
||||
@ -69,6 +70,9 @@ for(key in configs) {
|
||||
} else {
|
||||
log.error("签到失败")
|
||||
}
|
||||
} else {
|
||||
log.error("签到失败")
|
||||
}
|
||||
// log.info(`Wallet ${Wallet(makeHeader(configs[key])).StringVersion}`)
|
||||
// log.info(`Announcement ${Announcement(makeHeader(configs[key])).StringVersion}`)
|
||||
// console.log(makeHeader(configs[key]));
|
||||
|
Loading…
x
Reference in New Issue
Block a user