From 1a440aec2e47737573810074539293508ea6d025 Mon Sep 17 00:00:00 2001 From: smallfawn <101914820+smallfawn@users.noreply.github.com> Date: Fri, 24 Nov 2023 18:38:20 +0800 Subject: [PATCH] =?UTF-8?q?=E5=B9=BF=E6=B1=BD=E4=BC=A0=E7=A5=BA=EF=BC=9A?= =?UTF-8?q?=E6=9B=B4=E6=96=B0=E5=A4=A7=E6=B0=B4?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- gacmotor.js | 59 +++++++++++++++++++++-------------------------------- 1 file changed, 23 insertions(+), 36 deletions(-) diff --git a/gacmotor.js b/gacmotor.js index c748c3e..6efaef5 100644 --- a/gacmotor.js +++ b/gacmotor.js @@ -10,10 +10,8 @@ * 每天助力 gacmotorPower="" (抓这个需要手动做一次任务,我的-超级合伙人-每日任务-分享,微信自己点击自己分享的文章一次) * 微信抓gmp.spgacmotorsc.com/partner/api-content/base/content/trafficStatistics? * 后面的openId的值例如:oQzIW0jx-DbassAsaQgpGsasqXqCWI - * 答题活动(非必填,不填默认不执行) 需要在appToken & deviceCode & registrationID 后加一个 & mallToken - * 此 malltoken 需要手动获取(微信打开https://mall.gacmotor.com/act/answer-activity?id=464) - * 抓包https://mall.gacmotor.com/e-small-bff/fronted/activityAnswer/queryAnswerActivityInfo Headers中的token - * 这个就是mallToken + * 无需再抓广汽传祺H5的TOKEN(mallToken) 自动执行每周答题抽奖 + * * */ @@ -32,7 +30,7 @@ class UserInfo { this.ckStatus = true; this.deviceCode = str.split(strSplitor)[1]; this.registrationID = str.split(strSplitor)[2]; - this.mallToken = str.split(strSplitor)[3]; + this.mallToken = `DS-${this.ck}`; this.signInStatus = false//默认签到状态false this.userIdStr = "" this.name = "" @@ -201,39 +199,28 @@ class UserInfo { } } - if (this.mallToken !== undefined) { - console.log(`已填写微信广汽传祺Token 执行答题&抽奖`); - //获取答题活动列表 - await this._question_list({ "activityId": 464 }) - if (this.questionTaskId !== "") { - //获取题目 - await this._question_info({ "activityId": 464, "taskId": this.questionTaskId, "userSubmit": false }) - //答题 - await this._submit_answer({ "activityId": 464, "taskId": this.questionTaskId, "userSubmitAnswerVoList": [{ "questionId": this.questionId, "userAnswer": this.userAnswer, "answerIdList": this.answerIdList }] }) - //抽奖 - await this._activity_lotter_mall({ "activityId": "465", "channel": "wx_channel" }) - console.log(`目测30天内自动到账`) - //console.log(`请微信打开链接截图中奖记录 发给客服登记G豆 https://mall.gacmotor.com/act/turntable?id=465&channelCode=`); - //console.log(`加客服的地址 https://mall.gacmotor.com/act/answer-activity?id=464`); - } else { - console.log(`本周答题完成或未到活动时间`); - } - // - /*if (1700755199000 > this.BeiJingTime && this.BeiJingTime > 1700150400000) { - this.questionTaskId = 7 - } else if (1701359999000 > this.BeiJingTime && this.BeiJingTime > 1700755200000) { - this.questionTaskId = 8 - } else if (1701964799000 > this.BeiJingTime && this.BeiJingTime > 1701360000000) { - this.questionTaskId = 9 - } else if (1701964800000 > this.BeiJingTime && this.BeiJingTime > 1702569599000) { - this.questionTaskId = 10 - } else if (1702569600000 > this.BeiJingTime && this.BeiJingTime > 1703174399000) { - this.questionTaskId = 11 - } else if (1703174400000 > this.BeiJingTime && this.BeiJingTime > 1703779199000) { - this.questionTaskId = 12 - }*/ + console.log(`执行答题&抽奖`); + //获取答题活动列表 + await this._question_list({ "activityId": 464 }) + if (this.questionTaskId !== "") { + //获取题目 + await this._question_info({ "activityId": 464, "taskId": this.questionTaskId, "userSubmit": false }) + //答题 + await this._submit_answer({ "activityId": 464, "taskId": this.questionTaskId, "userSubmitAnswerVoList": [{ "questionId": this.questionId, "userAnswer": this.userAnswer, "answerIdList": this.answerIdList }] }) + //抽奖 + let lotterId = "465" + if (this.questionTaskId == 8) { + lotterId = "484" + } + await this._activity_lotter_mall({ "activityId": lotterId, "channel": "wx_channel" }) + console.log(`目测30天内自动到账`) + console.log(`请微信打开链接截查看中奖规则 https://mall.gacmotor.com/act/turntable?id=${lotterId}&channelCode=`); + console.log(`加客服的地址 https://mall.gacmotor.com/act/answer-activity?id=464`); + } else { + console.log(`本周答题完成或未到活动时间`); } + } _MD5(str) { const crypto = require("crypto");