This commit is contained in:
lxk0301
2021-05-17 20:55:16 +08:00
parent ae2fe381a3
commit 74c1a8ece7

View File

@@ -79,12 +79,14 @@ const JD_API_HOST = 'https://api.m.jd.com/';
} }
if (helpAuthor && $.authorCode) { if (helpAuthor && $.authorCode) {
console.log(`去帮助作者`) console.log(`去帮助作者`)
const helpRes = await help(code.shareCode, code.groupCode) for (let code of $.authorCode) {
const helpRes = await help(code.shareCode, code.groupCode);
if (helpRes && helpRes.data.respCode === 'SG209') { if (helpRes && helpRes.data.respCode === 'SG209') {
console.log(`助力次数已耗尽,跳出助力`) console.log(`助力次数已耗尽,跳出助力`)
break; break;
} }
} }
}
if (helpAuthor && $.authorCode2) { if (helpAuthor && $.authorCode2) {
for (let code of $.authorCode2) { for (let code of $.authorCode2) {
const helpRes = await help(code.shareCode, code.groupCode); const helpRes = await help(code.shareCode, code.groupCode);