Skip to content

Commit 6e88eae

Browse files
committed
1 parent 8e746c2 commit 6e88eae

1 file changed

Lines changed: 7 additions & 2 deletions

File tree

‎Task/txnews.js‎

Lines changed: 7 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -125,11 +125,11 @@ if (isGetCookie) {
125125
await Pending();
126126
};
127127
await StepsTotal();
128-
if(getreadred > 0){
128+
if(getreadred != 0){
129129
redbody = `redpack_type=article&activity_id=${actid}`
130130
await Redpack()
131131
};
132-
if(getvideored>0){
132+
if(getvideored != 0){
133133
redbody = `redpack_type=video&activity_id=${actid}`
134134
await Redpack()
135135
};
@@ -334,7 +334,9 @@ function Redpack() {
334334
}
335335
$.post(cashUrl, (error, response, data) => {
336336
let rcash = JSON.parse(data)
337+
console.log(data)
337338
try{
339+
if(rcash.data.award.length == 1){
338340
redpacks = rcash.data.award.num/100
339341
if (rcash.ret == 0&&redpacks>0&&getreadred > 0){
340342
redpackres = `【阅读红包】到账`+redpacks+`元 🌷\n`
@@ -344,6 +346,9 @@ function Redpack() {
344346
redpackres = `【视频红包】到账`+redpacks+`元 🌷\n`
345347
$.log("视频红包到账"+redpacks+"元\n")
346348
}
349+
} else {
350+
$.log(rcash.data.award.length+"个红包到账\n")
351+
}
347352
}
348353
catch(error){
349354
console.log("打开红包失败,响应数据: "+ data)

0 commit comments

Comments
 (0)