()
| 248 | |
| 249 | //签到函数 |
| 250 | async sign() { |
| 251 | try { |
| 252 | const hasSignedToday = await this.signstate(); |
| 253 | if (hasSignedToday) { |
| 254 | await this.points(); |
| 255 | return; |
| 256 | } |
| 257 | |
| 258 | const body = { |
| 259 | "signType": 0 |
| 260 | }; |
| 261 | |
| 262 | let options = { |
| 263 | url: `https://galaxy-app.geely.com/app/v1/sign/add`, |
| 264 | headers: this.getPostHeader(204453306, `/app/v1/sign/add`, JSON.stringify(body)), |
| 265 | body: JSON.stringify(body) |
| 266 | }; |
| 267 | |
| 268 | let result = await httpRequest(options); |
| 269 | |
| 270 | if (result.code == 0) { |
| 271 | $.DoubleLog(`✅签到成功!`); |
| 272 | await this.points(); |
| 273 | Notify = 1; |
| 274 | } else { |
| 275 | $.DoubleLog(`❌签到失败!`); |
| 276 | console.log("⚠️失败原因:", result); |
| 277 | Notify = 1; |
| 278 | } |
| 279 | } catch (e) { |
| 280 | console.log(e); |
| 281 | } |
| 282 | } |
| 283 | |
| 284 | //查询积分函数 |
| 285 | async points() { |
no test coverage detected