From 6a41be179005ee90b843726ede51ccbf5ea2f91e Mon Sep 17 00:00:00 2001 From: lidy Date: Tue, 12 Mar 2024 19:02:03 +0800 Subject: [PATCH 1/2] =?UTF-8?q?chore:=20=E5=90=8C=E6=AD=A5=E6=8E=98?= =?UTF-8?q?=E9=87=91=E5=8A=9F=E8=83=BD=EF=BC=9A=E5=81=9C=E7=94=A8=E6=B2=BE?= =?UTF-8?q?=E5=96=9C=E6=B0=94=E3=80=81=E6=94=B6=E9=9B=86Bugfix=E3=80=82?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- workflows/checkin.js | 77 +++++++++++++++++++++++--------------------- 1 file changed, 40 insertions(+), 37 deletions(-) diff --git a/workflows/checkin.js b/workflows/checkin.js index ffcd6e00..c89e02f2 100644 --- a/workflows/checkin.js +++ b/workflows/checkin.js @@ -49,24 +49,25 @@ class GrowthTask extends Task { class DipLuckyTask extends Task { taskName = "沾喜气"; - dipStatus = 0; + dipStatus = -1; dipValue = 0; luckyValue = 0; async run() { const growth = this.juejin.growth(); - const luckyusersResult = await growth.getLotteriesLuckyUsers(); - if (luckyusersResult.count > 0) { - const no1LuckyUser = luckyusersResult.lotteries[0]; - const dipLuckyResult = await growth.dipLucky(no1LuckyUser.history_id); - if (dipLuckyResult.has_dip) { - this.dipStatus = 2; - } else { - this.dipStatus = 1; - this.dipValue = dipLuckyResult.dip_value; - } - } + // 掘金沾喜气功能以停用! + // const luckyusersResult = await growth.getLotteriesLuckyUsers(); + // if (luckyusersResult.count > 0) { + // const no1LuckyUser = luckyusersResult.lotteries[0]; + // const dipLuckyResult = await growth.dipLucky(no1LuckyUser.history_id); + // if (dipLuckyResult.has_dip) { + // this.dipStatus = 2; + // } else { + // this.dipStatus = 1; + // this.dipValue = dipLuckyResult.dip_value; + // } + // } const luckyResult = await growth.getMyLucky(); this.luckyValue = luckyResult.total_value; @@ -76,7 +77,7 @@ class DipLuckyTask extends Task { class BugfixTask extends Task { taskName = "Bugfix"; - bugStatus = 0; + bugStatus = -1; collectBugCount = 0; userOwnBug = 0; @@ -87,15 +88,16 @@ class BugfixTask extends Task { const bugfixInfo = await bugfix.getUser(competition); this.userOwnBug = bugfixInfo.user_own_bug; - try { - const notCollectBugList = await bugfix.getNotCollectBugList(); - await bugfix.collectBugBatch(notCollectBugList); - this.bugStatus = 1; - this.collectBugCount = notCollectBugList.length; - this.userOwnBug += this.collectBugCount; - } catch (e) { - this.bugStatus = 2; - } + // 掘金Bugfix功能已停用。 + // try { + // const notCollectBugList = await bugfix.getNotCollectBugList(); + // await bugfix.collectBugBatch(notCollectBugList); + // this.bugStatus = 1; + // this.collectBugCount = notCollectBugList.length; + // this.userOwnBug += this.collectBugCount; + // } catch (e) { + // this.bugStatus = 2; + // } } } @@ -263,7 +265,7 @@ class CheckIn { await juejin.logout(); console.log("-------------------------"); - return this.growthTask.todayStatus + return this.growthTask.todayStatus; } toString() { @@ -285,20 +287,21 @@ ${ 1: `签到成功 +${this.growthTask.incrPoint} 矿石`, 2: "今日已完成签到" }[this.growthTask.todayStatus] -} -${ - { - 0: "沾喜气失败", - 1: `沾喜气 +${this.dipLuckyTask.dipValue} 幸运值`, - 2: "今日已经沾过喜气" - }[this.dipLuckyTask.dipStatus] -} -${ - this.bugfixTask.bugStatus === 1 - ? this.bugfixTask.collectBugCount > 0 - ? `收集Bug +${this.bugfixTask.collectBugCount}` - : "没有可收集Bug" - : "收集Bug失败" + // ${ + // { + // "-1": "沾喜气已停用", + // 0: "沾喜气失败", + // 1: `沾喜气 +${this.dipLuckyTask.dipValue} 幸运值`, + // 2: "今日已经沾过喜气" + // }[this.dipLuckyTask.dipStatus] + // } + // ${ + // this.bugfixTask.bugStatus === 1 + // ? this.bugfixTask.collectBugCount > 0 + // ? `收集Bug +${this.bugfixTask.collectBugCount}` + // : "没有可收集Bug" + // : "收集Bug失败" + // } } 连续签到天数 ${this.growthTask.contCount} 累计签到天数 ${this.growthTask.sumCount} From 494734a7148f0219661016a56ee0cb9a144d7383 Mon Sep 17 00:00:00 2001 From: lidy Date: Tue, 12 Mar 2024 19:02:56 +0800 Subject: [PATCH 2/2] feat: 1.8.0 --- workflows/package.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/workflows/package.json b/workflows/package.json index 2bff28d2..5eb7df08 100644 --- a/workflows/package.json +++ b/workflows/package.json @@ -1,6 +1,6 @@ { "name": "workflows", - "version": "1.7.4", + "version": "1.8.0", "private": true, "description": "稀土掘金助手:签到、抽奖、沾喜气、消除Bug、海底掘金游戏、自动化工作流。", "author": "Derek Li",