@@ -49,24 +49,25 @@ class GrowthTask extends Task {
49
49
class DipLuckyTask extends Task {
50
50
taskName = "沾喜气" ;
51
51
52
- dipStatus = 0 ;
52
+ dipStatus = - 1 ;
53
53
dipValue = 0 ;
54
54
luckyValue = 0 ;
55
55
56
56
async run ( ) {
57
57
const growth = this . juejin . growth ( ) ;
58
58
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
+ // }
70
71
71
72
const luckyResult = await growth . getMyLucky ( ) ;
72
73
this . luckyValue = luckyResult . total_value ;
@@ -76,7 +77,7 @@ class DipLuckyTask extends Task {
76
77
class BugfixTask extends Task {
77
78
taskName = "Bugfix" ;
78
79
79
- bugStatus = 0 ;
80
+ bugStatus = - 1 ;
80
81
collectBugCount = 0 ;
81
82
userOwnBug = 0 ;
82
83
@@ -87,15 +88,16 @@ class BugfixTask extends Task {
87
88
const bugfixInfo = await bugfix . getUser ( competition ) ;
88
89
this . userOwnBug = bugfixInfo . user_own_bug ;
89
90
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
+ // }
99
101
}
100
102
}
101
103
@@ -263,7 +265,7 @@ class CheckIn {
263
265
await juejin . logout ( ) ;
264
266
console . log ( "-------------------------" ) ;
265
267
266
- return this . growthTask . todayStatus
268
+ return this . growthTask . todayStatus ;
267
269
}
268
270
269
271
toString ( ) {
285
287
1 : `签到成功 +${ this . growthTask . incrPoint } 矿石` ,
286
288
2 : "今日已完成签到"
287
289
} [ 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
+ // }
302
305
}
303
306
连续签到天数 ${ this . growthTask . contCount }
304
307
累计签到天数 ${ this . growthTask . sumCount }
0 commit comments