Skip to content
This repository has been archived by the owner on Jan 10, 2022. It is now read-only.

Commit

Permalink
硬币数info
Browse files Browse the repository at this point in the history
  • Loading branch information
catlair committed May 2, 2021
1 parent a665839 commit 380c502
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 1 deletion.
2 changes: 2 additions & 0 deletions src/config/globalVar.ts
Original file line number Diff line number Diff line change
Expand Up @@ -19,6 +19,8 @@ export abstract class DailyTask {

static readonly STAY_COINS = userConfig.stayCoins ?? 0;

static money = 0;

static excludesLiveRoom: number[] = userConfig.excludesLiveRoom || [];

static includesLiveRoom: number[] = userConfig.includesLiveRoom || [];
Expand Down
5 changes: 4 additions & 1 deletion src/dailyTask/upTask.ts
Original file line number Diff line number Diff line change
Expand Up @@ -91,6 +91,9 @@ export class UPTask {
}

await this.closeUpPage();
if (isStopCoin) {
logger.info('剩余硬币数', this.userNav?.money);
}
return isStopCoin;
}

Expand All @@ -117,7 +120,7 @@ export class UPTask {
const pageUrl = await this.page.url();
const includesWords = ['/video', 'bangumi', 'read/cv', 'audio/au'];
const isIncludesWord = includesWords.some(word => pageUrl.includes(word));
logger.info('剩余硬币数', this.userNav?.money || '未知');
DailyTask.money = this.userNav?.money;
if (!this.page.isClosed() && isIncludesWord) {
await this.page.util.wt(2, 4);
await this.page.close();
Expand Down

0 comments on commit 380c502

Please sign in to comment.