()
| 560 | |
| 561 | // 为好友助力 return true 继续助力 false 助力结束 |
| 562 | async function helpFriends() { |
| 563 | let tmpShareCodeJson = {}; |
| 564 | for (let code of currentShareCode) { |
| 565 | if (!code) { |
| 566 | continue |
| 567 | } |
| 568 | tmpShareCodeJson = changeShareCodeJson(code); |
| 569 | if (!tmpShareCodeJson) { //非 json 格式跳过 |
| 570 | console.log('助力码非 json 格式,跳过') |
| 571 | continue; |
| 572 | } |
| 573 | const next = await helpShareCode(tmpShareCodeJson['smp'], tmpShareCodeJson['active'], tmpShareCodeJson['joinnum']); |
| 574 | if (!next) { |
| 575 | return false; |
| 576 | } |
| 577 | await $.wait(1000); |
| 578 | } |
| 579 | return true; |
| 580 | } |
| 581 | |
| 582 | // 执行助力 return true 继续助力 false 助力结束 |
| 583 | function helpShareCode(smp, active, joinnum) { |
no test coverage detected