| 179 | } |
| 180 | |
| 181 | getHeaders(sign, ts) { |
| 182 | return { |
| 183 | "User-Agent": USER_AGENT, |
| 184 | "Referer": `https://servicewechat.com/${MINI_APP_ID}/${PAGE_VERSION}/page-frame.html`, |
| 185 | "Accept": "application/json, text/plain, */*", |
| 186 | "Content-Type": "application/json;charset=UTF-8", |
| 187 | "appid": MINI_APP_ID, |
| 188 | "token": this.token, |
| 189 | "ts": ts, |
| 190 | "startTime": ts, |
| 191 | "sign": sign, |
| 192 | "X-TracedId": crypto.randomUUID(), |
| 193 | }; |
| 194 | } |
| 195 | |
| 196 | async request(apiPath, data = {}, method = "GET") { |
| 197 | const payload = data || {}; |