From 15b09c7a5ca5f0480afe8eb34728ed6ae8665d3d Mon Sep 17 00:00:00 2001 From: smallfawn <101914820+smallfawn@users.noreply.github.com> Date: Sun, 26 Nov 2023 09:13:02 +0800 Subject: [PATCH] =?UTF-8?q?=E5=8C=97=E4=BA=AC=E6=B1=BD=E8=BD=A6?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit 1.修复点赞已点赞问题 2.修复加密方式字符串排序问题 --- bjev.js | 18 ++++++++++-------- 1 file changed, 10 insertions(+), 8 deletions(-) diff --git a/bjev.js b/bjev.js index 4959c64..f3a80cd 100644 --- a/bjev.js +++ b/bjev.js @@ -41,7 +41,7 @@ class UserInfo { this.task_num_like = Number(task.progressLimit) - Number(task.progress) } else if (task.status == "1") { - this.task_award(task.taskGroupCode) + await this.task_award(task.taskGroupCode) } $.log(`点赞 ${task.progress} / ${task.progressLimit}`) //点赞 @@ -59,7 +59,7 @@ class UserInfo { if (task.status == "0") { this.task_num_share = Number(task.progressLimit) - Number(task.progress) } else if (task.status == "1") { - this.task_award(task.taskGroupCode) + await this.task_award(task.taskGroupCode) } $.log(`转发 ${task.progress} / ${task.progressLimit}`) //转发 @@ -95,7 +95,7 @@ class UserInfo { get_headers(method, url, body = "") { url = url.replace("https://beijing-gateway-customer.app-prod.bjev.com.cn", "") let path = url.split('?')[0] - let params = url.split('?')[1].replaceAll('&', '').toLowerCase() + let params = url.split('?')[1].split('&').sort().join("").toLowerCase() method = method.toUpperCase(); let timestamp = new Date().getTime() const key = `96189e76b405f63f8460367ab2ec74ac` @@ -187,21 +187,23 @@ class UserInfo { let options = { fn: "文章列表", method: "get", - url: `https://beijing-gateway-customer.app-prod.bjev.com.cn/beijing-info-configure/exterior/recommend/list?pageIndex=1&pageSize=20&uuid_check=${this.get_uuid()}`, + url: `https://beijing-gateway-customer.app-prod.bjev.com.cn/beijing-zone-dynamic/exterior/dynamic/list?isRecommend=1&pageIndex=1&pageSize=10&isHot=1&uuid_check=${this.get_uuid()}`, } options.headers = this.get_headers(options.method, options.url) - //console.log(options); + console.log(options); let { body: result } = await httpRequest(options); //console.log(options); result = JSON.parse(result); - //console.log(result); + console.log(result); if (result.code == "0") { //领取成功 //console.log(`✅[文章列表]成功`) for (let artId of result.data.dataList) { - if (artId.modelType == "2") { - this.artList.push(artId.modelContent.id) + if (artId.liked == "-1") {//判断未点赞的 + this.artList.push(artId.id) + } + } } else { console.log(`❌[${options.fn}]失败`)