Skip to content

Commit 21afcf8

Browse files
authored
Merge pull request #141 from iDerekLi/dev
1.8.0
2 parents 344e1a2 + 494734a commit 21afcf8

File tree

2 files changed

+41
-38
lines changed

2 files changed

+41
-38
lines changed

workflows/checkin.js

Lines changed: 40 additions & 37 deletions
Original file line numberDiff line numberDiff line change
@@ -49,24 +49,25 @@ class GrowthTask extends Task {
4949
class DipLuckyTask extends Task {
5050
taskName = "沾喜气";
5151

52-
dipStatus = 0;
52+
dipStatus = -1;
5353
dipValue = 0;
5454
luckyValue = 0;
5555

5656
async run() {
5757
const growth = this.juejin.growth();
5858

59-
const luckyusersResult = await growth.getLotteriesLuckyUsers();
60-
if (luckyusersResult.count > 0) {
61-
const no1LuckyUser = luckyusersResult.lotteries[0];
62-
const dipLuckyResult = await growth.dipLucky(no1LuckyUser.history_id);
63-
if (dipLuckyResult.has_dip) {
64-
this.dipStatus = 2;
65-
} else {
66-
this.dipStatus = 1;
67-
this.dipValue = dipLuckyResult.dip_value;
68-
}
69-
}
59+
// 掘金沾喜气功能以停用!
60+
// const luckyusersResult = await growth.getLotteriesLuckyUsers();
61+
// if (luckyusersResult.count > 0) {
62+
// const no1LuckyUser = luckyusersResult.lotteries[0];
63+
// const dipLuckyResult = await growth.dipLucky(no1LuckyUser.history_id);
64+
// if (dipLuckyResult.has_dip) {
65+
// this.dipStatus = 2;
66+
// } else {
67+
// this.dipStatus = 1;
68+
// this.dipValue = dipLuckyResult.dip_value;
69+
// }
70+
// }
7071

7172
const luckyResult = await growth.getMyLucky();
7273
this.luckyValue = luckyResult.total_value;
@@ -76,7 +77,7 @@ class DipLuckyTask extends Task {
7677
class BugfixTask extends Task {
7778
taskName = "Bugfix";
7879

79-
bugStatus = 0;
80+
bugStatus = -1;
8081
collectBugCount = 0;
8182
userOwnBug = 0;
8283

@@ -87,15 +88,16 @@ class BugfixTask extends Task {
8788
const bugfixInfo = await bugfix.getUser(competition);
8889
this.userOwnBug = bugfixInfo.user_own_bug;
8990

90-
try {
91-
const notCollectBugList = await bugfix.getNotCollectBugList();
92-
await bugfix.collectBugBatch(notCollectBugList);
93-
this.bugStatus = 1;
94-
this.collectBugCount = notCollectBugList.length;
95-
this.userOwnBug += this.collectBugCount;
96-
} catch (e) {
97-
this.bugStatus = 2;
98-
}
91+
// 掘金Bugfix功能已停用。
92+
// try {
93+
// const notCollectBugList = await bugfix.getNotCollectBugList();
94+
// await bugfix.collectBugBatch(notCollectBugList);
95+
// this.bugStatus = 1;
96+
// this.collectBugCount = notCollectBugList.length;
97+
// this.userOwnBug += this.collectBugCount;
98+
// } catch (e) {
99+
// this.bugStatus = 2;
100+
// }
99101
}
100102
}
101103

@@ -263,7 +265,7 @@ class CheckIn {
263265
await juejin.logout();
264266
console.log("-------------------------");
265267

266-
return this.growthTask.todayStatus
268+
return this.growthTask.todayStatus;
267269
}
268270

269271
toString() {
@@ -285,20 +287,21 @@ ${
285287
1: `签到成功 +${this.growthTask.incrPoint} 矿石`,
286288
2: "今日已完成签到"
287289
}[this.growthTask.todayStatus]
288-
}
289-
${
290-
{
291-
0: "沾喜气失败",
292-
1: `沾喜气 +${this.dipLuckyTask.dipValue} 幸运值`,
293-
2: "今日已经沾过喜气"
294-
}[this.dipLuckyTask.dipStatus]
295-
}
296-
${
297-
this.bugfixTask.bugStatus === 1
298-
? this.bugfixTask.collectBugCount > 0
299-
? `收集Bug +${this.bugfixTask.collectBugCount}`
300-
: "没有可收集Bug"
301-
: "收集Bug失败"
290+
// ${
291+
// {
292+
// "-1": "沾喜气已停用",
293+
// 0: "沾喜气失败",
294+
// 1: `沾喜气 +${this.dipLuckyTask.dipValue} 幸运值`,
295+
// 2: "今日已经沾过喜气"
296+
// }[this.dipLuckyTask.dipStatus]
297+
// }
298+
// ${
299+
// this.bugfixTask.bugStatus === 1
300+
// ? this.bugfixTask.collectBugCount > 0
301+
// ? `收集Bug +${this.bugfixTask.collectBugCount}`
302+
// : "没有可收集Bug"
303+
// : "收集Bug失败"
304+
// }
302305
}
303306
连续签到天数 ${this.growthTask.contCount}
304307
累计签到天数 ${this.growthTask.sumCount}

workflows/package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
{
22
"name": "workflows",
3-
"version": "1.7.4",
3+
"version": "1.8.0",
44
"private": true,
55
"description": "稀土掘金助手:签到、抽奖、沾喜气、消除Bug、海底掘金游戏、自动化工作流。",
66
"author": "Derek Li",

0 commit comments

Comments
 (0)