Skip to content

Commit add703a

Browse files
committed
【10010】恢复天天抽奖,并增加BoxJs开关
1 parent 1bb6841 commit add703a

2 files changed

Lines changed: 13 additions & 6 deletions

File tree

‎10010/10010.js‎

Lines changed: 11 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -8,6 +8,7 @@ const KEY_loginlotteryurl = 'chavy_loginlotteryurl_10010'
88
const KEY_loginlotteryheader = 'chavy_loginlotteryheader_10010'
99
const KEY_findlotteryurl = 'chavy_findlotteryurl_10010'
1010
const KEY_findlotteryheader = 'chavy_findlotteryheader_10010'
11+
const chavygolottery = true
1112

1213
const signinfo = {}
1314
let VAL_loginurl = chavy.getdata(KEY_loginurl)
@@ -18,19 +19,22 @@ let VAL_loginlotteryurl = chavy.getdata(KEY_loginlotteryurl)
1819
let VAL_loginlotteryheader = chavy.getdata(KEY_loginlotteryheader)
1920
let VAL_findlotteryurl = chavy.getdata(KEY_findlotteryurl)
2021
let VAL_findlotteryheader = chavy.getdata(KEY_findlotteryheader)
22+
let golottery = JSON.parse(chavy.getdata("chavy_golottery_10010")||chavygolottery)
2123

2224
;(sign = async () => {
2325
chavy.log(`🔔 ${cookieName}`)
2426
await loginapp()
2527
await signapp()
26-
if (VAL_loginlotteryurl && VAL_findlotteryurl) await loginlottery()
27-
if (signinfo.encryptmobile) {
28+
if (golottery == true) {
29+
if (VAL_loginlotteryurl && VAL_findlotteryurl) await loginlottery()
30+
if (signinfo.encryptmobile) {
2831
await findlottery()
2932
if (signinfo.findlottery && signinfo.findlottery.acFrequency && signinfo.findlottery.acFrequency.usableAcFreq) {
3033
for (let i = 0; i < signinfo.findlottery.acFrequency.usableAcFreq; i++) {
3134
await lottery()
3235
}
3336
}
37+
}
3438
}
3539
await getinfo()
3640
showmsg()
@@ -188,16 +192,18 @@ function showmsg() {
188192
} else {
189193
chavy.log(`❌ ${cookieName} signapp - response: ${JSON.stringify(signinfo.info)}`)
190194
}
191-
192-
if (signinfo.findlottery && signinfo.findlottery.acFrequency && signinfo.lotterylist) {
195+
196+
if (golottery == true) {
197+
if (signinfo.findlottery && signinfo.findlottery.acFrequency && signinfo.lotterylist) {
193198
subTitle += `; 抽奖: ${signinfo.findlottery.acFrequency.usableAcFreq}次`
194199
detail += '\n查看详情\n'
195200

196201
for (let i = 0; i < signinfo.findlottery.acFrequency.usableAcFreq; i++) {
197202
detail += `\n抽奖 (${i + 1}): ${signinfo.lotterylist[i].RspMsg}`
198203
}
199-
} else {
204+
} else {
200205
chavy.log(`❌ ${cookieName} signapp - response: ${JSON.stringify(signinfo.findlottery)}`)
206+
}
201207
}
202208

203209
chavy.msg(cookieName, subTitle, detail)

‎box/chavy.boxjs.json‎

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -19,6 +19,7 @@
1919
"id": "10010",
2020
"name": "10010",
2121
"keys": ["chavy_tokenurl_10010", "chavy_tokenheader_10010", "chavy_signurl_10010", "chavy_signheader_10010", "chavy_loginlotteryurl_10010", "chavy_loginlotteryheader_10010", "chavy_findlotteryurl_10010", "chavy_findlotteryheader_10010"],
22+
"settings": [{ "id": "chavy_golottery_10010", "name": "天天抽奖", "val": true, "type": "boolean", "desc": "天天抽奖开关" }],
2223
"author": "@chavyleung",
2324
"repo": "https://github.com/chavyleung/scripts/tree/master/10010",
2425
"script": "https://raw.githubusercontent.com/chavyleung/scripts/master/10010/10010.js",
@@ -333,4 +334,4 @@
333334
"icons": ["https://raw.githubusercontent.com/Orz-3/mini/master/wps.png", "https://raw.githubusercontent.com/Orz-3/task/master/wps.png"]
334335
}
335336
]
336-
}
337+
}

0 commit comments

Comments
 (0)