@@ -22,15 +22,83 @@ class UserInfo {
2222 //定义在这里的headers会被get请求删掉content-type 而不会重置
2323 }
2424 async main ( ) {
25+
26+ await this . manageList ( )
27+ await this . querySceneGameInstance ( )
2528 await this . task ( ) ;
2629 await this . userInfo ( )
2730 }
31+
32+
33+ async manageList ( ) {
34+ try {
35+ let options = {
36+ fn : "首页" ,
37+ method : "post" ,
38+ url : `https://www.popcentury.cn/scrm-rz-minip-tzlm/minipPointsController/showIconManageList` ,
39+ headers : {
40+ "Connection" : "keep-alive" ,
41+ //"Content-Length": "2",
42+ "Accept" : "application/json, text/plain, */*" ,
43+ "X-Requested-With" : "XMLHttpRequest" ,
44+ "User-Agent" : "Mozilla/5.0 (Linux; Android 10; MI 8 Lite Build/QKQ1.190910.002; wv) AppleWebKit/537.36 (KHTML, like Gecko) Version/4.0 Chrome/111.0.5563.116 Mobile Safari/537.36 XWEB/1110017 MMWEBSDK/20231002 MMWEBID/2585 MicroMessenger/8.0.43.2480(0x28002B51) WeChat/arm64 Weixin NetType/WIFI Language/zh_CN ABI/arm64" ,
45+ "Content-Type" : "application/json;charset=UTF-8" ,
46+ "Origin" : "http://www.jumpingcarp.cn" ,
47+ "Referer" : "https://servicewechat.com/wx10b22bd20e2bccca/11/page-frame.html" ,
48+ "Accept-Encoding" : "gzip, deflate" ,
49+ "Accept-Language" : "zh-CN,zh;q=0.9,en-US;q=0.8,en;q=0.7" ,
50+ //"Cookie": "JSESSIONID=" + this.ck
51+ } ,
52+ body : JSON . stringify ( { } )
53+ }
54+ let { body : result } = await $ . httpRequest ( options ) ;
55+ //console.log(options);
56+ //console.log(result);
57+ for ( let item of result . data . iconList ) {
58+ if ( item . iconName . match ( / 签 到 / ) ) {
59+ this . sceneGameInstanceCode = item . actionUrl . split ( "?" ) [ 1 ]
60+ break
61+ }
62+ }
63+ } catch ( e ) {
64+ console . log ( e ) ;
65+ }
66+ }
67+ async querySceneGameInstance ( ) {
68+ try {
69+ let options = {
70+ fn : "签到信息" ,
71+ method : "post" ,
72+ url : `https://www.popcentury.cn/scrm-rz-minip-tzlm/minipPointsController/querySceneGameInstance` ,
73+ headers : {
74+ "Connection" : "keep-alive" ,
75+ //"Content-Length": "2",
76+ "Accept" : "application/json, text/plain, */*" ,
77+ "X-Requested-With" : "XMLHttpRequest" ,
78+ "User-Agent" : "Mozilla/5.0 (Linux; Android 10; MI 8 Lite Build/QKQ1.190910.002; wv) AppleWebKit/537.36 (KHTML, like Gecko) Version/4.0 Chrome/111.0.5563.116 Mobile Safari/537.36 XWEB/1110017 MMWEBSDK/20231002 MMWEBID/2585 MicroMessenger/8.0.43.2480(0x28002B51) WeChat/arm64 Weixin NetType/WIFI Language/zh_CN ABI/arm64" ,
79+ "Content-Type" : "application/x-www-form-urlencoded;charset=UTF-8" ,
80+ "Origin" : "http://www.jumpingcarp.cn" ,
81+ "Referer" : "https://servicewechat.com/wx10b22bd20e2bccca/11/page-frame.html" ,
82+ "Accept-Encoding" : "gzip, deflate" ,
83+ "Accept-Language" : "zh-CN,zh;q=0.9,en-US;q=0.8,en;q=0.7" ,
84+ "Cookie" : "JSESSIONID=" + this . ck
85+ } ,
86+ body : `${ this . sceneGameInstanceCode } `
87+ }
88+ let { body : result } = await $ . httpRequest ( options ) ;
89+ //console.log(options);
90+ //console.log(result);
91+
92+ } catch ( e ) {
93+ console . log ( e ) ;
94+ }
95+ }
2896 async task ( ) {
2997 try {
3098 let options = {
3199 fn : "签到" ,
32100 method : "post" ,
33- url : `http ://www.jumpingcarp .cn/scrm-rz-wechat -tzlm/lotteryController/extractMemberAwards ` ,
101+ url : `https ://www.popcentury .cn/scrm-rz-minip -tzlm/minipPointsController/extractInstanceMemberAwards? ${ this . sceneGameInstanceCode } ` ,
34102 headers : {
35103 "Connection" : "keep-alive" ,
36104 //"Content-Length": "2",
@@ -49,7 +117,7 @@ class UserInfo {
49117 let { body : result } = await $ . httpRequest ( options ) ;
50118 //console.log(options);
51119 console . log ( result ) ;
52-
120+
53121 } catch ( e ) {
54122 console . log ( e ) ;
55123 }
@@ -59,7 +127,7 @@ class UserInfo {
59127 let options = {
60128 fn : "我的积分" ,
61129 method : "post" ,
62- url : `http ://www.jumpingcarp .cn/scrm-rz-wechat -tzlm/memberController/showMemberInfo` ,
130+ url : `https ://www.popcentury .cn/scrm-rz-minip -tzlm/memberController/showMemberInfo.do ` ,
63131 headers : {
64132 "Connection" : "keep-alive" ,
65133 //"Content-Length": "2",
@@ -78,12 +146,12 @@ class UserInfo {
78146 let { body : result } = await $ . httpRequest ( options ) ;
79147 //console.log(options);
80148 //console.log(result);
81- if ( result . code == 200 ) {
149+ if ( result . code == 200 ) {
82150 $ . log ( `当前积分[${ result . data . pointsBalance } ]` )
83- } else {
151+ } else {
84152 console . log ( result ) ;
85153 }
86-
154+
87155 } catch ( e ) {
88156 console . log ( e ) ;
89157 }
0 commit comments