From 2b7e6454ea2507ee6149783c829a0c8b3171add8 Mon Sep 17 00:00:00 2001 From: smallfawn <101914820+smallfawn@users.noreply.github.com> Date: Sun, 24 Mar 2024 14:44:52 +0800 Subject: [PATCH] =?UTF-8?q?=E6=9B=B4=E6=96=B0=E9=98=85=E8=AF=BB=E6=96=87?= =?UTF-8?q?=E7=AB=A0=E4=BB=BB=E5=8A=A1?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- wx_xlxyh.js | 35 ++++++++++++++++++++++++++++++++--- 1 file changed, 32 insertions(+), 3 deletions(-) diff --git a/wx_xlxyh.js b/wx_xlxyh.js index 7e93584..828a631 100644 --- a/wx_xlxyh.js +++ b/wx_xlxyh.js @@ -16,7 +16,6 @@ let envSplitor = ["&", "\n"]; //多账号分隔符 let strSplitor = "#"; //多变量分隔符 let userIdx = 0; let userList = []; -let msg = "" class Task { constructor(str) { this.index = ++userIdx; @@ -35,8 +34,12 @@ class Task { await this.LuckDrawApi() await this.ArticleListApi() if (this.articleId !== "") { + await this.ReadStartApi(this.articleId) await this.LikeApi(this.articleId) await this.ShareApi(this.articleId) + $.log(`模拟阅读55s`) + await $.wait(55000) + await this.ReadEndApi(this.articleId) } } async taskRequest(method, url, body = "") { @@ -69,14 +72,13 @@ class Task { if (LuckDrawTaskResult.code == 200) { $.log(`账号[${this.userId}] 抽奖成功 获得[${LuckDrawTaskResult.data.name}]`) } else { - //console.log(LuckDrawTaskResult) + //console.log(LuckDrawTaskResult) $.log(`账号[${this.userId}] 抽奖失败 ${LuckDrawTaskResult.message}`); } } } else { $.log(`账号[${this.userId}] 获取抽奖信息失败 ${LuckDrawNumResult.message}`); } - } catch (e) { console.log(e); } @@ -96,6 +98,33 @@ class Task { console.log(e); } } + async ReadStartApi(articleId) { + try { + let ReadStartApi = await this.taskRequest("post", `https://qualcomm.growthideadata.com/qualcomm-app/api/article/enterReadDaily`, `articleId=${articleId}&userId=${this.userId}`) + if (ReadStartApi.code == 200) { + $.log(`✅账号[${this.userId}] 阅读文章开始上传成功🎉`); + + } else { + $.log(`❌账号[${this.userId}] 阅读文章开始上传失败 [${ReadStartApi.message}]`); + + } + } catch (e) { + console.log(e); + } + } + async ReadEndApi(articleId) { + try { + let ReadEndApi = await this.taskRequest("post", `https://qualcomm.growthideadata.com/qualcomm-app/api/article/exitReadDaily`, `articleId=${articleId}&userId=${this.userId}`) + if (ReadEndApi.code == 200) { + $.log(`✅账号[${this.userId}] 阅读文章结束上传成功🎉`); + + } else { + $.log(`❌账号[${this.userId}] 阅读文章结束上传失败 [${ReadEndApi.message}]`); + } + } catch (e) { + console.log(e); + } + } async ShareApi(articleId) { try { let ShareResult = await this.taskRequest("post", `https://qualcomm.growthideadata.com/qualcomm-app/api/article/shareDaily`, `articleId=${articleId}&userId=${this.userId}`)