| 163 | } |
| 164 | |
| 165 | getHeaders(extra = {}) { |
| 166 | const headers = { |
| 167 | "User-Agent": USER_AGENT, |
| 168 | "Referer": `https://servicewechat.com/${MINI_APP_ID}/402/page-frame.html`, |
| 169 | "Accept": "application/json, text/plain, */*", |
| 170 | "Content-Type": "application/json", |
| 171 | appId: APP_ID, |
| 172 | tenantId: TENANT_ID, |
| 173 | wxAppid: MINI_APP_ID, |
| 174 | groupId: this.groupId || "", |
| 175 | ...extra, |
| 176 | }; |
| 177 | if (this.memberId) headers.userId = this.memberId; |
| 178 | return headers; |
| 179 | } |
| 180 | |
| 181 | async request({ method = "GET", apiPath, params = {}, data = {} }) { |
| 182 | const upperMethod = method.toUpperCase(); |