()
| 587 | } |
| 588 | //领取额外奖励水滴 |
| 589 | async function getExtraAward() { |
| 590 | await masterHelpTaskInitForFarm(); |
| 591 | if ($.masterHelpResult.code === '0') { |
| 592 | if ($.masterHelpResult.masterHelpPeoples && $.masterHelpResult.masterHelpPeoples.length >= 5) { |
| 593 | // 已有五人助力。领取助力后的奖励 |
| 594 | if (!$.masterHelpResult.masterGotFinal) { |
| 595 | await masterGotFinishedTaskForFarm(); |
| 596 | if ($.masterGotFinished.code === '0') { |
| 597 | console.log(`已成功领取好友助力奖励:【${$.masterGotFinished.amount}】g水`); |
| 598 | message += `【额外奖励】${$.masterGotFinished.amount}g水领取成功\n`; |
| 599 | } |
| 600 | } else { |
| 601 | console.log("已经领取过5好友助力额外奖励"); |
| 602 | message += `【额外奖励】已被领取过\n`; |
| 603 | } |
| 604 | } else { |
| 605 | console.log("助力好友未达到5个"); |
| 606 | message += `【额外奖励】领取失败,原因:给您助力的人未达5个\n`; |
| 607 | } |
| 608 | if ($.masterHelpResult.masterHelpPeoples && $.masterHelpResult.masterHelpPeoples.length > 0) { |
| 609 | let str = ''; |
| 610 | $.masterHelpResult.masterHelpPeoples.map((item, index) => { |
| 611 | if (index === ($.masterHelpResult.masterHelpPeoples.length - 1)) { |
| 612 | str += item.nickName || "匿名用户"; |
| 613 | } else { |
| 614 | str += (item.nickName || "匿名用户") + ','; |
| 615 | } |
| 616 | let date = new Date(item.time); |
| 617 | let time = date.getFullYear() + '-' + (date.getMonth() + 1) + '-' + date.getDate() + ' ' + date.getHours() + ':' + date.getMinutes() + ':' + date.getMinutes(); |
| 618 | console.log(`\n京东昵称【${item.nickName || "匿名用户"}】 在 ${time} 给您助过力\n`); |
| 619 | }) |
| 620 | message += `【助力您的好友】${str}\n`; |
| 621 | } |
| 622 | console.log('领取额外奖励水滴结束\n'); |
| 623 | } |
| 624 | } |
| 625 | //助力好友 |
| 626 | async function masterHelpShare() { |
| 627 | console.log('开始助力好友') |
no test coverage detected