File tree 1 file changed +12
-4
lines changed
1 file changed +12
-4
lines changed Original file line number Diff line number Diff line change @@ -5,6 +5,8 @@ const token = $.isNode() ? process.env.kfxtoken : ""
5
5
const tokenList = token . split ( "&" )
6
6
const logDebug = 0
7
7
8
+ let cardsMsg = [ ]
9
+
8
10
function sign ( token ) {
9
11
return new Promise ( async ( resolve , reject ) => {
10
12
let url = `https://fscrm.kraftheinz.net.cn/crm/public/index.php/api/v1/dailySign`
@@ -48,12 +50,15 @@ function getScoreOrder(token,body){
48
50
await httpRequest ( 'post' , urlObject )
49
51
let result = httpResult ;
50
52
// console.log(result ? result.data : "")
51
- let respData = result . data . data ;
53
+ let respData = result ? .data . data ;
52
54
let cards = [ ]
53
- for ( let i = 0 ; i < respData . length ; i ++ ) {
54
- cards . push ( respData [ i ] . awardResult )
55
+ for ( let i = 0 ; i < respData ?. length ; i ++ ) {
56
+ let temObj = JSON . parse ( respData [ i ] . awardResult )
57
+ cards . push ( temObj . cards . card )
58
+
55
59
}
56
- await notify . sendNotify ( `卡数据` , `${ cards } ` )
60
+ cardsMsg . push ( cards )
61
+
57
62
resolve ( true )
58
63
} )
59
64
}
@@ -141,6 +146,9 @@ async function main () {
141
146
}
142
147
143
148
}
149
+ console . log ( cardsMsg )
150
+
151
+ await notify . sendNotify ( `卡数据` , `${ JSON . stringify ( cardsMsg ) } ` )
144
152
145
153
}
146
154
You can’t perform that action at this time.
0 commit comments