| 374 | } |
| 375 | |
| 376 | async loadClockConfig() { |
| 377 | const res = await axios.get(ACTIVITY_CONFIG, { |
| 378 | timeout: 15000, |
| 379 | validateStatus: () => true, |
| 380 | headers: { |
| 381 | "User-Agent": "Mozilla/5.0 MicroMessenger MiniProgramEnv/Windows", |
| 382 | Referer: `https://servicewechat.com/${MINI_APP_ID}/249/page-frame.html`, |
| 383 | }, |
| 384 | }); |
| 385 | if (res.data?.result === "ok" && res.data?.data?.value) { |
| 386 | this.clockConfig = res.data.data.value; |
| 387 | if (!this.clockConfig.key && this.clockConfig.s_key) this.clockConfig.key = this.clockConfig.s_key; |
| 388 | } |
| 389 | } |
| 390 | |
| 391 | async userInfo() { |
| 392 | const data = assertOk(await this.request("POST", "https://account.wps.cn/p/auth/check"), "查询用户信息"); |