MCPcopy
hub / github.com/chavyleung/scripts / sign

Function sign

haidilao/hdl.js:29–53  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

27}
28
29function sign() {
30 const signurlVal = hdl.getdata(signurlKey)
31 const signheaderVal = hdl.getdata(signheaderKey)
32 const signbodyVal = hdl.getdata(signbodyKey)
33 const url = { url: signurlVal, headers: JSON.parse(signheaderVal), body: signbodyVal }
34 hdl.post(url, (error, response, data) => {
35 hdl.log(`${cookieName}, data: ${data}`)
36 const title = `${cookieName}`
37 let subTitle = ''
38 let detail = ''
39 const result = JSON.parse(data)
40 if (result.success == true && result.signInfoVO.todaySigned == true) {
41 subTitle = `签到结果: 成功`
42 detail = `签到奖励: ${result.customInfo.foodNum}火柴, 连签: ${result.signInfoVO.continueDay}天`
43 } else if (result.success == false && result.signInfoVO.todaySigned == true) {
44 subTitle = `签到结果: 成功 (重复签到)`
45 detail = `连签: ${result.signInfoVO.continueDay}天`
46 } else {
47 subTitle = `签到结果: 失败`
48 detail = `说明: ${result.message}, 请重新获取`
49 }
50 hdl.msg(title, subTitle, detail)
51 hdl.done()
52 })
53}
54
55function init() {
56 isSurge = () => {

Callers 1

hdl.jsFile · 0.70

Calls 5

getdataMethod · 0.45
postMethod · 0.45
logMethod · 0.45
msgMethod · 0.45
doneMethod · 0.45

Tested by

no test coverage detected

Used in the wild real call sites across dependent graphs

searching dependent graphs…