(extra = {})
| 125 | } |
| 126 | |
| 127 | getHeaders(extra = {}) { |
| 128 | const headers = { |
| 129 | "User-Agent": USER_AGENT, |
| 130 | "Referer": `https://servicewechat.com/${MINI_APP_ID}/${PAGE_VERSION}/page-frame.html`, |
| 131 | "Accept": "application/json, text/plain, */*", |
| 132 | ...extra, |
| 133 | }; |
| 134 | if (this.token) headers.Authorization = `Bearer ${this.token}`; |
| 135 | return headers; |
| 136 | } |
| 137 | |
| 138 | async request({ method = "GET", apiPath, data, params, skipToken = false }) { |
| 139 | const options = { |