File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change 22
33> 代码已同时兼容 Surge & QuanX, 使用同一份签到脚本即可
44> 感谢 [ @barry ] ( https://t.me/barrymchen ) 编写
5+ >
56> 感谢 [ @GideonSenku ] ( https://github.com/GideonSenku ) 对代码优化
67
78## 配置 (Surge)
1112daojia.jd.com
1213
1314[Script]
14- http-request ^https:\/\/daojia\ .jd\ .com\ /client? script -path =https://raw.githubusercontent.com/chavyleung/scripts/master/jddj/jddj.cookie.js, requires-body =true
15+ ^https:\/\/daojia.jd.com/client(.*?) functionId =signin(.*?) userSigninNewscript -path =https://raw.githubusercontent.com/chavyleung/scripts/master/jddj/jddj.cookie.js, requires-body =true
1516
1617cron " 10 0 0 * * *" script-path =https://raw.githubusercontent.com/chavyleung/scripts/master/jddj/jddj.js
1718```
@@ -28,7 +29,7 @@ daojia.jd.com
2829# ^https:\/\/daojia\.jd\.com\/client? url script-request-header jddj.cookie.js
2930
3031# [TestFlight] QuanX v1.0.6-build195 及以后版本
31- ^https:\/\/daojia\ .jd\ .com\ /client? url script-request-body https://raw.githubusercontent.com/chavyleung/scripts/master/jddj/jddj.cookie.js
32+ ^https:\/\/daojia.jd.com/client(.*?) functionId =signin(.*?)userSigninNew url script-request-body https://raw.githubusercontent.com/chavyleung/scripts/master/jddj/jddj.cookie.js
3233
3334[task_local]
34351 0 * * * jddj.js
Original file line number Diff line number Diff line change @@ -3,16 +3,17 @@ const signurlKey = 'chen_signurl_jddj'
33const signheaderKey = 'chen_signheader_jddj'
44const chen = init ( )
55const requrl = $request . url
6- if ( $request && $request . method != 'OPTIONS' ) {
7- const signurlVal = requrl
8- const signheaderVal = JSON . stringify ( $request . headers )
9- const flag = requrl . includes ( 'functionId=signinuserSigninNew' )
10- if ( signurlVal && signheaderVal && flag ) {
11- chen . setdata ( signurlVal , signurlKey )
12- chen . setdata ( signheaderVal , signheaderKey )
13- chen . msg ( cookieName , `获取Cookie: 成功` , `` )
6+ if ( this . $request ) {
7+ const signurlVal = requrl
8+ 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 )
13+ chen . setdata ( signheaderVal , signheaderKey )
14+ chen . msg ( cookieName , `获取Cookie: 成功` , `` )
15+ }
1416 }
15- }
1617function init ( ) {
1718 isSurge = ( ) => {
1819 return undefined === this . $httpClient ? false : true
Original file line number Diff line number Diff line change @@ -16,14 +16,13 @@ function sign() {
1616 if ( res . success && res . result . points ) {
1717 subTitle = `签到结果:成功`
1818 detail = `获取鲜豆:${ res . result . points } `
19- } else if ( res . success == false ) {
19+ } else if ( ! res . success ) {
2020 subTitle = `签到结果: 重复签到`
2121 detail = `说明: ${ res . msg } `
2222 }
2323 chen . msg ( title , subTitle , detail )
2424 } )
25- chen . done ( )
26- }
25+ }
2726
2827 function init ( ) {
2928 isSurge = ( ) => {
You can’t perform that action at this time.
0 commit comments