(auth = false)
| 140 | } |
| 141 | |
| 142 | getHeaders(auth = false) { |
| 143 | const headers = { |
| 144 | "User-Agent": USER_AGENT, |
| 145 | "Referer": `https://servicewechat.com/${MINI_APP_ID}/${PAGE_VERSION}/page-frame.html`, |
| 146 | "Accept": "application/json, text/plain, */*", |
| 147 | "Content-Type": "application/json", |
| 148 | }; |
| 149 | if (!auth) headers.token = this.token || ""; |
| 150 | return headers; |
| 151 | } |
| 152 | |
| 153 | async request(method, apiPath, data = {}, options = {}) { |
| 154 | const requestOptions = { |