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

Commit

Permalink
update
Browse files Browse the repository at this point in the history
  • Loading branch information
catlair committed May 12, 2021
1 parent dfcbf7a commit deb7db0
Show file tree
Hide file tree
Showing 2 changed files with 13 additions and 4 deletions.
4 changes: 3 additions & 1 deletion src/dailyTask/upTask.ts
Original file line number Diff line number Diff line change
Expand Up @@ -256,7 +256,9 @@ export class UPTask {
const runArray: any = [
this.getCoinNum(),
this.page.waitForNavigation(),
$$item[num].click(),
this.contributeType === 0
? $$item[num].$eval('a', (a: HTMLAnchorElement) => a.click())
: $$item[num].click(),
];
switch (this.contributeType) {
case 1:
Expand Down
13 changes: 10 additions & 3 deletions src/plugins/eval-plugin.ts
Original file line number Diff line number Diff line change
Expand Up @@ -172,9 +172,16 @@ class Util {

/** 页面增加lodash */
async addScriptLodash() {
await this.page.addScriptTag({
url: 'https://cdn.jsdelivr.net/npm/[email protected]/lodash.min.js',
});
try {
await this.page.addScriptTag({
url: 'https://cdn.jsdelivr.net/npm/[email protected]/lodash.min.js',
});
} catch {
await this.page.addScriptTag({
url:
'https://cdnjs.cloudflare.com/ajax/libs/lodash.js/4.17.21/lodash.min.js',
});
}
}
}

Expand Down

0 comments on commit deb7db0

Please sign in to comment.