| 27 | } |
| 28 | |
| 29 | function 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 | |
| 55 | function init() { |
| 56 | isSurge = () => { |