!11 [京喜农场] 忽略部分 logErr 日志 & notify 通知关闭时,通过 log 输出 message
Merge pull request !11 from 古月玄/master
This commit is contained in:
16
jd_jxnc.js
16
jd_jxnc.js
@@ -77,7 +77,7 @@ let assistUserShareCode = 0; // 随机助力用户 share code
|
||||
$.index = i + 1;
|
||||
$.isLogin = true;
|
||||
$.nickName = '';
|
||||
$.log(`检查【京东账号${$.index}】${$.UserName} cookie 是否有效`);
|
||||
$.log(`\n************* 检查【京东账号${$.index}】${$.UserName} cookie 是否有效 *************`);
|
||||
await TotalBean();
|
||||
$.log(`开始【京东账号${$.index}】${$.nickName || $.UserName}\n`);
|
||||
if (!$.isLogin) {
|
||||
@@ -93,6 +93,7 @@ let assistUserShareCode = 0; // 随机助力用户 share code
|
||||
$.answer = 0;
|
||||
$.helpNum = 0;
|
||||
$.helpSelfNum = 0;
|
||||
notifyBool = notifyLevel > 0; // 初始化是否推送
|
||||
await tokenFormat(); // 处理当前账号 token
|
||||
await shareCodesFormat(); // 处理当前账号 助力码
|
||||
await jdJXNC(); // 执行当前账号 主代码流程
|
||||
@@ -112,7 +113,6 @@ function requireConfig() {
|
||||
return new Promise(resolve => {
|
||||
$.log('开始获取配置文件\n')
|
||||
notify = $.isNode() ? require('./sendNotify') : '';
|
||||
notifyBool = notifyLevel > 0; // 初始化是否推送
|
||||
//Node.js用户请在jdCookie.js处填写京东ck;
|
||||
const jdCookieNode = $.isNode() ? require('./jdCookie.js') : '';
|
||||
const jdTokenNode = $.isNode() ? require('./jdJxncTokens.js') : '';
|
||||
@@ -426,14 +426,15 @@ function submitInviteId(userName) {
|
||||
message += '【邀请码】提交成功!\n';
|
||||
}
|
||||
} catch (e) {
|
||||
$.logErr(e, resp);
|
||||
// $.logErr(e, resp);
|
||||
$.log('邀请码提交失败 API 返回异常');
|
||||
} finally {
|
||||
resolve();
|
||||
}
|
||||
},
|
||||
);
|
||||
} catch (e) {
|
||||
$.logErr(e, resp);
|
||||
// $.logErr(e, resp);
|
||||
resolve();
|
||||
}
|
||||
});
|
||||
@@ -452,13 +453,14 @@ function getAssistUser() {
|
||||
$.log(`获取随机助力码失败 ${code}`);
|
||||
}
|
||||
} catch (e) {
|
||||
$.logErr(e, resp);
|
||||
// $.logErr(e, resp);
|
||||
$.log('获取随机助力码失败 API 返回异常');
|
||||
} finally {
|
||||
resolve(false);
|
||||
}
|
||||
});
|
||||
} catch (e) {
|
||||
$.logErr(e, resp);
|
||||
// $.logErr(e, resp);
|
||||
resolve(false);
|
||||
}
|
||||
});
|
||||
@@ -573,6 +575,8 @@ async function showMsg() {
|
||||
if ($.isNode()) {
|
||||
await notify.sendNotify(`${$.name} - 账号${$.index} - ${$.nickName}`, `${subTitle}\n${message}`);
|
||||
}
|
||||
} else {
|
||||
$.log(`${$.name} - notify 通知已关闭\n账号${$.index} - ${$.nickName}\n${subTitle}\n${message}`);
|
||||
}
|
||||
}
|
||||
|
||||
|
Reference in New Issue
Block a user