File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -41,10 +41,9 @@ daojia.jd.com
41412 . 再配置重写规则:
4242 - Surge: 把两条远程脚本放到` [Script] `
4343 - QuanX: 把` jddj.cookie.js ` 和` jddj.js ` 传到` On My iPhone - Quantumult X - Scripts ` (传到 iCloud 相同目录也可, 注意要打开 quanx 的 iCloud 开关)
44- 3 . 手机浏览器打开` https://daojia.jd.com/html/index.html ` 点击签到
44+ 3 . 手机App打开, ` 我的 ` > ` 签到有惊喜 ` > ` 签到 ` 手机浏览器打开` https://daojia.jd.com/html/index.html ` , ` 我的 ` > ` 签到有惊喜 ` > ` 签到 `
45454 . 系统提示: ` 获取Cookie: 成功 `
46- 5 . 把获取 Cookie 的脚本注释掉,不用再次运行签到脚本!大概率导致Cookie失效
47- 6 . 测试版远程尝试,获取不到Cookie请采用本地脚本!
46+ 5 . 把获取 Cookie 的脚本注释掉
4847
4948> 第 1 条脚本是用来获取 cookie 的, 用浏览器访问一次获取 cookie 成功后就可以删掉或注释掉了, 但请确保在` 登录成功 ` 后再获取 cookie.
5049
Original file line number Diff line number Diff line change 11const cookieName = '京东到家'
2- const signurlKey = 'chen_signurl_jddj'
32const signheaderKey = 'chen_signheader_jddj'
43const chen = init ( )
5- const requrl = $request . url
64 if ( this . $request ) {
7- const signurlVal = requrl
85 const signheaderVal = JSON . stringify ( $request . headers )
9- chen . log ( `URL:${ signurlVal } ` )
10- const flag = requrl . includes ( 'userSigninNew' )
11- if ( flag ) {
12- chen . setdata ( signurlVal , signurlKey )
6+ if ( signheaderVal ) {
137 chen . setdata ( signheaderVal , signheaderKey )
148 chen . msg ( cookieName , `获取Cookie: 成功` , `` )
159 }
Original file line number Diff line number Diff line change 11const cookieName = '京东到家'
2- const signurlKey = 'chen_signurl_jddj'
32const signheaderKey = 'chen_signheader_jddj'
43const chen = init ( )
54const signurlVal = chen . getdata ( signurlKey )
65const signheaderVal = chen . getdata ( signheaderKey )
76sign ( )
87function sign ( ) {
9- let url = { url : signurlVal , headers : JSON . parse ( signheaderVal ) }
8+ let url = { url : `https://daojia.jd.com/client?functionId=signin%2FuserSigninNew&body=%7B%7D` , headers : JSON . parse ( signheaderVal ) }
109 chen . get ( url , ( error , response , data ) => {
1110 chen . log ( `${ cookieName } , data: ${ data } ` )
1211 let res = JSON . parse ( data )
@@ -20,6 +19,9 @@ function sign() {
2019 subTitle = `签到结果: 失败`
2120 detail = `说明: ${ res . msg } `
2221 }
22+ else if ( ! res . success && res . code == - 1 ) {
23+ subTitle = `签到成功,请勿重复操作`
24+ }
2325 else {
2426 subTitle = `未知错误,截图日志`
2527 }
You can’t perform that action at this time.
0 commit comments