修复助力火爆问题

This commit is contained in:
wisz2021
2021-05-12 09:52:03 +08:00
parent 2cbb61d237
commit fb1e15160c

View File

@@ -2,7 +2,7 @@
* @Author: lxk0301 https://gitee.com/lxk0301
* @Date: 2020-11-27 09:19:21
* @Last Modified by: lxk0301
* @Last Modified time: 2021-4-27 16:58:02
* @Last Modified time: 2021-5-12 16:58:02
*/
/*
赚京豆脚本,一:签到(一周签到可获得30京豆),二:做任务 天天领京豆(加速领京豆)、三:赚京豆-瓜分京豆
@@ -586,7 +586,8 @@ function helpFriendTuan(body) {
"assistStartRecordId": body['assistStartRecordId'],
"channel": body['channel'],
}
$.get(taskUrl("vvipclub_distributeBean_assist", data), async (err, resp, data) => {
delete body['time'];
$.get(taskTuanUrl("vvipclub_distributeBean_assist", body), async (err, resp, data) => {
try {
if (err) {
console.log(`${JSON.stringify(err)}`)
@@ -618,7 +619,7 @@ function helpFriendTuan(body) {
function getUserTuanInfo() {
let body = {"paramData": {"channel": "FISSION_BEAN"}}
return new Promise(resolve => {
$.get(taskUrl("distributeBeanActivityInfo", body), async (err, resp, data) => {
$.get(taskTuanUrl("distributeBeanActivityInfo", body), async (err, resp, data) => {
try {
if (err) {
console.log(`${JSON.stringify(err)}`)
@@ -666,7 +667,7 @@ function getUserTuanInfo() {
function openTuan() {
let body = {"activityIdEncrypted": $.tuanActId, "channel": "FISSION_BEAN"}
return new Promise(resolve => {
$.get(taskUrl("vvipclub_distributeBean_startAssist", body), async (err, resp, data) => {
$.get(taskTuanUrl("vvipclub_distributeBean_startAssist", body), async (err, resp, data) => {
try {
if (err) {
console.log(`${JSON.stringify(err)}`)
@@ -760,7 +761,22 @@ function taskUrl(function_id, body = {}) {
}
}
function taskTuanUrl(function_id, body = {}) {
return {
url: `${JD_API_HOST}?functionId=${function_id}&body=${escape(JSON.stringify(body))}&appid=swat_miniprogram&osVersion=5.0.0&clientVersion=3.1.3&fromType=wxapp&timestamp=${new Date().getTime() + new Date().getTimezoneOffset() * 60 * 1000 + 8 * 60 * 60 * 1000}`,
headers: {
"Accept": "*/*",
"Accept-Encoding": "gzip, deflate, br",
"Accept-Language": "zh-cn",
"Connection": "keep-alive",
"Content-Type": "application/x-www-form-urlencoded",
"Host": "api.m.jd.com",
"Referer": "https://servicewechat.com/wxa5bf5ee667d91626/108/page-frame.html",
"Cookie": cookie,
"User-Agent": $.isNode() ? (process.env.JD_USER_AGENT ? process.env.JD_USER_AGENT : (require('./USER_AGENTS').USER_AGENT)) : ($.getdata('JDUA') ? $.getdata('JDUA') : "jdapp;iPhone;9.4.4;14.3;network/4g;Mozilla/5.0 (iPhone; CPU iPhone OS 14_3 like Mac OS X) AppleWebKit/605.1.15 (KHTML, like Gecko) Mobile/15E148;supportJDSHWK/1"),
}
}
}
function TotalBean() {
return new Promise(async resolve => {