(options)
| 83 | } |
| 84 | |
| 85 | async function request(options) { |
| 86 | const res = await axios.request({ |
| 87 | timeout: 25000, |
| 88 | validateStatus: () => true, |
| 89 | ...options, |
| 90 | headers: { |
| 91 | "User-Agent": USER_AGENT, |
| 92 | Accept: "application/json, text/plain, */*", |
| 93 | ...(options.headers || {}), |
| 94 | }, |
| 95 | }); |
| 96 | return { status: res.status, headers: res.headers || {}, data: res.data }; |
| 97 | } |
| 98 | |
| 99 | async function getWxCode(openid) { |
| 100 | if (!WX_AUTH) throw new Error("未配置 wx_auth,无法从 wx_server 获取 code"); |
no test coverage detected