()
| 20 | .finally(() => $.done()) |
| 21 | |
| 22 | function login() { |
| 23 | const loginOpts = $.getjson($.KEY_login) |
| 24 | const url = { |
| 25 | url: `https://api.wfdata.club/v1/auth/signin`, |
| 26 | body: loginOpts['body'], |
| 27 | headers: { |
| 28 | 'X-Request-Id': encrypt(`url=/v1/auth/signin$time=${new Date().getTime()}`), |
| 29 | 'X-Running-Env': loginOpts['headers']['X-Running-Env'] |
| 30 | } |
| 31 | } |
| 32 | return $.http.post(url).then((resp) => { |
| 33 | $.login = JSON.parse(resp.body).data |
| 34 | }) |
| 35 | } |
| 36 | |
| 37 | function sign() { |
| 38 | const loginOpts = $.getjson($.KEY_login) |