| 35 | } |
| 36 | |
| 37 | function sign() { |
| 38 | const loginOpts = $.getjson($.KEY_login) |
| 39 | const url = { |
| 40 | url: `https://api.wfdata.club/v1/attendance/userSignIn`, |
| 41 | body: '', |
| 42 | headers: { |
| 43 | 'Content-Type': `application/x-www-form-urlencoded`, |
| 44 | 'User-Agent': `fengapp/6.4 (com.feng.New.WPForumClient; build:21.03.14; iOS 14.4.1) Alamofire/4.9.1`, |
| 45 | 'X-Request-Id': encrypt(`url=/v1/attendance/userSignIn$time=${new Date().getTime()}`), |
| 46 | 'X-Running-Env': loginOpts['headers']['X-Running-Env'], |
| 47 | 'X-Access-Token': $.login.accessToken |
| 48 | } |
| 49 | } |
| 50 | return $.http |
| 51 | .post(url) |
| 52 | .then((resp) => { |
| 53 | $.sign = JSON.parse(resp.body) |
| 54 | }) |
| 55 | .catch((err) => console.log(err)) |
| 56 | } |
| 57 | |
| 58 | function showmsg() { |
| 59 | const signCode = $.sign.status.code |