2
2
cron "18 8 * * *"
3
3
4
4
2-9 发布第一版 签到+积分抽奖
5
+ 2-18 增加积分查询功能
5
6
6
7
入口: https://github.com/yml2213/javascript/blob/master/ksf/ksf.jpg
7
8
@@ -46,11 +47,16 @@ const notify = $.isNode() ? require('./sendNotify') : '';
46
47
console . log ( `-------- 共 ${ wx_yml_ksf_data . length } 个账号 --------` )
47
48
// console.log(wx_yml_ksf_data);
48
49
console . log (
49
- `\n\n=== 脚本执行 - 北京时间(UTC+8):${ new Date (
50
+ `\n\n====== 脚本执行 - 北京时间(UTC+8):${ new Date (
50
51
new Date ( ) . getTime ( ) +
51
52
new Date ( ) . getTimezoneOffset ( ) * 60 * 1000 +
52
53
8 * 60 * 60 * 1000
53
- ) . toLocaleString ( ) } ===\n`) ;
54
+ ) . toLocaleString ( ) } ======\n`) ;
55
+
56
+ console . log ( `=======成功运行脚本后不要打开小程序,会导致token失效=======` ) ;
57
+ console . log ( `=======成功运行脚本后不要打开小程序,会导致token失效=======` ) ;
58
+ console . log ( `=======成功运行脚本后不要打开小程序,会导致token失效=======` ) ;
59
+
54
60
55
61
56
62
await wyy ( ) ;
@@ -70,6 +76,7 @@ const notify = $.isNode() ? require('./sendNotify') : '';
70
76
await $ . wait ( 2 * 1000 ) ;
71
77
await cj ( ) ;
72
78
await $ . wait ( 2 * 1000 ) ;
79
+ await cx ( ) ;
73
80
74
81
75
82
}
@@ -200,7 +207,45 @@ function cj(timeout = 0) {
200
207
201
208
}
202
209
210
+ // https://club.biqr.cn/api/member/getMemberInfo
211
+ // 积分查询
212
+ function cx ( timeout = 0 ) {
213
+ return new Promise ( ( resolve ) => {
214
+ let url = {
215
+ url : `https://${ host } /api/member/getMemberInfo` ,
216
+ headers : {
217
+ 'Content-Type' : 'application/x-www-form-urlencoded' ,
218
+ 'Token' : token [ 0 ] ,
219
+ } ,
203
220
221
+ }
222
+ // console.log(url);
223
+
224
+ $ . get ( url , async ( err , resp , data ) => {
225
+
226
+ try {
227
+
228
+ // console.log(`输出data开始===================`);
229
+ // console.log(data);
230
+ // console.log(`输出data结束===================`);
231
+
232
+ result = JSON . parse ( data ) ;
233
+ if ( result . code === 0 ) {
234
+ $ . log ( `\n 当前账号: ${ result . data . nickname } , \n 查询积分:${ result . data . integral } ,\n 累计获得查询积分:${ result . data . totalIntegral } ` )
235
+
236
+ } else {
237
+ $ . log ( `\n 查询积分:失败 ❌ 了呢,请重新获取token ! ` )
238
+ }
239
+ } catch ( e ) {
240
+ $ . logErr ( e , resp ) ;
241
+ } finally {
242
+ resolve ( )
243
+ }
244
+ } , timeout )
245
+
246
+ } )
247
+
248
+ }
204
249
205
250
206
251
0 commit comments