From 0771f5f3b94a5acc13cce2402cd1f60fc9c29556 Mon Sep 17 00:00:00 2001 From: yyds Date: Sat, 26 Feb 2022 00:50:53 +0800 Subject: [PATCH] yyds --- jd_cfd.js | 38 +++++++------------------------------- 1 file changed, 7 insertions(+), 31 deletions(-) diff --git a/jd_cfd.js b/jd_cfd.js index a0dcb3d..6966c8d 100644 --- a/jd_cfd.js +++ b/jd_cfd.js @@ -38,8 +38,9 @@ $.result = []; $.shareCodes = []; let cookiesArr = [], cookie = '', token = ''; let UA, UAInfo = {}; +let nowTimes; const randomCount = $.isNode() ? 20 : 3; -$.appId = "92a36"; +$.appId = 10032; if ($.isNode()) { Object.keys(jdCookieNode).forEach((item) => { cookiesArr.push(jdCookieNode[item]) @@ -120,6 +121,7 @@ if ($.isNode()) { async function cfd() { try { + nowTimes = new Date(new Date().getTime() + new Date().getTimezoneOffset() * 60 * 1000 + 8 * 60 * 60 * 1000) let beginInfo = await getUserInfo(); if (beginInfo.LeadInfo.dwLeadType === 2) { console.log(`还未开通活动,尝试初始化`) @@ -134,10 +136,6 @@ async function cfd() { } } - if (!beginInfo.MarkList.daily_task_win) { - await setMark() - } - // 寻宝 console.log(`寻宝`) let XBDetail = beginInfo.XbStatus.XBDetail.filter((x) => x.dwRemainCnt !== 0) @@ -1123,25 +1121,6 @@ function getAuthorShareCode(url) { }) } -function setMark() { - return new Promise(resolve => { - $.get(taskUrl("user/SetMark", `strMark=daily_task_win&strValue=1&dwType=1`), (err, resp, data) => { - try { - if (err) { - console.log(`${JSON.stringify(err)}`); - console.log(`${$.name} SetMark API请求失败,请检查网路重试`); - } else { - data = JSON.parse(data.replace(/\n/g, "").match(new RegExp(/jsonpCBK.?\((.*);*\)/))[1]); - } - } catch (e) { - $.logErr(e, resp); - } finally{ - resolve(); - } - }) - }) -} - // 获取用户信息 function getUserInfo(showInvite = true) { return new Promise(async (resolve) => { @@ -1163,8 +1142,7 @@ function getUserInfo(showInvite = true) { LeadInfo = {}, StoryInfo = {}, Business = {}, - XbStatus = {}, - MarkList = {} + XbStatus = {} } = data; if (showInvite) { console.log(`获取用户信息:${sErrMsg}\n${$.showLog ? data : ""}`); @@ -1185,8 +1163,7 @@ function getUserInfo(showInvite = true) { dwLandLvl, LeadInfo, StoryInfo, - XbStatus, - MarkList + XbStatus }; resolve({ buildInfo, @@ -1195,8 +1172,7 @@ function getUserInfo(showInvite = true) { strMyShareId, LeadInfo, StoryInfo, - XbStatus, - MarkList + XbStatus }); } } catch (e) { @@ -1740,7 +1716,7 @@ async function requestAlgo() { 'Accept-Language': 'zh-CN,zh;q=0.9,zh-TW;q=0.8,en;q=0.7' }, 'body': JSON.stringify({ - "version": "3.0", + "version": "1.0", "fp": $.fingerprint, "appId": $.appId.toString(), "timestamp": Date.now(),