修复宠汪汪获取token的bug
This commit is contained in:
@@ -9,27 +9,30 @@
|
|||||||
1、微信搜索'来客有礼'小程序,登陆京东账号,点击底部的'我的'或者'发现'两处地方,即可获取Token,脚本运行提示token失效后,继续按此方法获取即可
|
1、微信搜索'来客有礼'小程序,登陆京东账号,点击底部的'我的'或者'发现'两处地方,即可获取Token,脚本运行提示token失效后,继续按此方法获取即可
|
||||||
2、或者每天去'来客有礼'小程序->宠汪汪里面,领狗粮->签到领京豆 也可获取Token(此方法每天只能获取一次)
|
2、或者每天去'来客有礼'小程序->宠汪汪里面,领狗粮->签到领京豆 也可获取Token(此方法每天只能获取一次)
|
||||||
脚本里面有内置提供的friendPin,如果你没有修改脚本或者BoxJs处填写自己的互助码,会默认给脚本内置的助力。
|
脚本里面有内置提供的friendPin,如果你没有修改脚本或者BoxJs处填写自己的互助码,会默认给脚本内置的助力。
|
||||||
[MITM]
|
[MITM]
|
||||||
hostname = draw.jdfcloud.com
|
hostname = draw.jdfcloud.com
|
||||||
surge
|
|
||||||
[Script]
|
Surge
|
||||||
宠汪汪邀请助力与赛跑助力 = type=cron,cronexp="15 10 * * *",wake-system=1,timeout=20,script-path=https://raw.githubusercontent.com/lxk0301/jd_scripts/master/jd_joy_run.js
|
[Script]
|
||||||
宠汪汪助力更新Token = type=http-response,pattern=^https:\/\/draw\.jdfcloud\.com\/mirror\/\/api\/user\/addUser\?code=\w+&, requires-body=1, max-size=0, script-path=https://raw.githubusercontent.com/lxk0301/jd_scripts/master/jd_joy_run.js
|
宠汪汪邀请助力与赛跑助力 = type=cron,cronexp="15 10 * * *",wake-system=1,timeout=20,script-path=https://raw.githubusercontent.com/lxk0301/jd_scripts/master/jd_joy_run.js
|
||||||
宠汪汪助力获取Token = type=http-request,pattern=^https:\/\/draw\.jdfcloud\.com\/mirror\/\/api\/user\/user\/detail\?openId=\w+&, requires-body=1, max-size=0, script-path=https://raw.githubusercontent.com/lxk0301/jd_scripts/master/jd_joy_run.js
|
宠汪汪助力更新Token = type=http-response,pattern=^https:\/\/draw\.jdfcloud\.com\/mirror\/\/api\/user\/addUser\?code=, requires-body=1, max-size=0, script-path=https://raw.githubusercontent.com/lxk0301/jd_scripts/master/jd_joy_run.js
|
||||||
圈X
|
宠汪汪助力获取Token = type=http-request,pattern=^https:\/\/draw\.jdfcloud\.com\/mirror\/\/api\/user\/user\/detail\?openId=, requires-body=1, max-size=0, script-path=https://raw.githubusercontent.com/lxk0301/jd_scripts/master/jd_joy_run.js
|
||||||
[task_local]
|
|
||||||
# 宠汪汪邀请助力与赛跑助力
|
圈X
|
||||||
15 10 * * * https://raw.githubusercontent.com/lxk0301/jd_scripts/master/jd_joy_run.js, tag=宠汪汪邀请助力与赛跑助力, img-url=https://raw.githubusercontent.com/58xinian/icon/master/jdcww.png, enabled=true
|
[task_local]
|
||||||
[rewrite_local]
|
# 宠汪汪邀请助力与赛跑助力
|
||||||
# 宠汪汪助力更新Token
|
15 10 * * * https://raw.githubusercontent.com/lxk0301/jd_scripts/master/jd_joy_run.js, tag=宠汪汪邀请助力与赛跑助力, img-url=https://raw.githubusercontent.com/58xinian/icon/master/jdcww.png, enabled=true
|
||||||
^https:\/\/draw\.jdfcloud\.com\/mirror\/\/api\/user\/addUser\?code=\w+& url script-response-body https://raw.githubusercontent.com/lxk0301/jd_scripts/master/jd_joy_run.js
|
[rewrite_local]
|
||||||
# 宠汪汪助力获取Token
|
# 宠汪汪助力更新Token
|
||||||
^https:\/\/draw\.jdfcloud\.com\/mirror\/\/api\/user\/user\/detail\?openId=\w+& url script-request-header https://raw.githubusercontent.com/lxk0301/jd_scripts/master/jd_joy_run.js
|
^https:\/\/draw\.jdfcloud\.com\/mirror\/\/api\/user\/addUser\?code= url script-response-body https://raw.githubusercontent.com/lxk0301/jd_scripts/master/jd_joy_run.js
|
||||||
LOON:
|
# 宠汪汪助力获取Token
|
||||||
[Script]
|
^https:\/\/draw\.jdfcloud\.com\/mirror\/\/api\/user\/user\/detail\?openId= url script-request-header https://raw.githubusercontent.com/lxk0301/jd_scripts/master/jd_joy_run.js
|
||||||
cron "15 10 * * *" script-path=https://raw.githubusercontent.com/lxk0301/jd_scripts/master/jd_joy_run.js, tag=宠汪汪邀请助力与赛跑助力
|
|
||||||
http-response ^https:\/\/draw\.jdfcloud\.com\/mirror\/\/api\/user\/addUser\?code=\w+& script-path=https://raw.githubusercontent.com/lxk0301/jd_scripts/master/jd_joy_run.js, requires-body=true, timeout=10, tag=宠汪汪助力更新Token
|
*****Loon****
|
||||||
http-request ^https:\/\/draw\.jdfcloud\.com\/mirror\/\/api\/user\/user\/detail\?openId=\w+& script-path=https://raw.githubusercontent.com/lxk0301/jd_scripts/master/jd_joy_run.js, requires-body=true, timeout=10, tag=宠汪汪助力获取Token
|
[Script]
|
||||||
|
cron "15 10 * * *" script-path=https://raw.githubusercontent.com/lxk0301/jd_scripts/master/jd_joy_run.js, tag=宠汪汪邀请助力与赛跑助力
|
||||||
|
http-response ^https:\/\/draw\.jdfcloud\.com\/mirror\/\/api\/user\/addUser\?code= script-path=https://raw.githubusercontent.com/lxk0301/jd_scripts/master/jd_joy_run.js, requires-body=true, timeout=10, tag=宠汪汪助力更新Token
|
||||||
|
http-request ^https:\/\/draw\.jdfcloud\.com\/mirror\/\/api\/user\/user\/detail\?openId= script-path=https://raw.githubusercontent.com/lxk0301/jd_scripts/master/jd_joy_run.js, requires-body=true, timeout=10, tag=宠汪汪助力获取Token
|
||||||
**/
|
**/
|
||||||
const isRequest = typeof $request != "undefined"
|
const isRequest = typeof $request != "undefined"
|
||||||
const $ = new Env('来客有礼宠汪汪');
|
const $ = new Env('来客有礼宠汪汪');
|
||||||
@@ -101,7 +104,7 @@ if ($.isNode()) {
|
|||||||
function getToken() {
|
function getToken() {
|
||||||
const url = $request.url;
|
const url = $request.url;
|
||||||
$.log(`${$.name}url\n${url}\n`)
|
$.log(`${$.name}url\n${url}\n`)
|
||||||
if (isURL(url, /^https:\/\/draw\.jdfcloud\.com\/mirror\/\/api\/user\/addUser\?code=\w+&/)) {
|
if (isURL(url, /^https:\/\/draw\.jdfcloud\.com\/mirror\/\/api\/user\/addUser\?code=/)) {
|
||||||
const body = JSON.parse($response.body);
|
const body = JSON.parse($response.body);
|
||||||
const LKYLToken = body.data.token;
|
const LKYLToken = body.data.token;
|
||||||
$.log(`${$.name} token\n${LKYLToken}\n`)
|
$.log(`${$.name} token\n${LKYLToken}\n`)
|
||||||
@@ -112,7 +115,7 @@ function getToken() {
|
|||||||
}
|
}
|
||||||
$.setdata(LKYLToken, 'jdJoyRunToken');
|
$.setdata(LKYLToken, 'jdJoyRunToken');
|
||||||
$.done({ body: JSON.stringify(body) })
|
$.done({ body: JSON.stringify(body) })
|
||||||
} else if (isURL(url, /^https:\/\/draw\.jdfcloud\.com\/mirror\/\/api\/user\/user\/detail\?openId=\w+&/)){
|
} else if (isURL(url, /^https:\/\/draw\.jdfcloud\.com\/mirror\/\/api\/user\/user\/detail\?openId=/)){
|
||||||
if ($request && $request.method !== 'OPTIONS') {
|
if ($request && $request.method !== 'OPTIONS') {
|
||||||
const LKYLToken = $request.headers['LKYLToken'];
|
const LKYLToken = $request.headers['LKYLToken'];
|
||||||
//if ($.getdata('jdJoyRunToken')) {
|
//if ($.getdata('jdJoyRunToken')) {
|
||||||
|
Reference in New Issue
Block a user