(accountToken)
| 138 | } |
| 139 | |
| 140 | async queryUserInfo(accountToken) { |
| 141 | const path = "/api-gw/oauthserver/applet/v1/userinfo/query"; |
| 142 | let options = { |
| 143 | method: "POST", |
| 144 | url: API_HOST + path, |
| 145 | path, |
| 146 | isSign256: true, |
| 147 | isHeaderDelToken: true, |
| 148 | data: { accountToken }, |
| 149 | }; |
| 150 | const { data: result } = await this.request(options); |
| 151 | if (result?.retCode !== "00000" && result?.code !== 200 && !result?.success) { |
| 152 | throw new Error(result?.retInfo || result?.message || JSON.stringify(result)); |
| 153 | } |
| 154 | const info = result?.data?.userinfo || {}; |
| 155 | const name = info.nickName || info.nickname || info.userName || "未知用户"; |
| 156 | const phone = info.mobile || info.phoneNumber || ""; |
| 157 | $.log(`账号[${this.index}] 用户: ${name}${phone ? ` ${phone.slice(0, 3)}****${phone.slice(-4)}` : ""}`); |
| 158 | return info; |
| 159 | } |
| 160 | |
| 161 | async pointInfo() { |
| 162 | const path = "/zjapi/zjBaseServer/signDetail/getUserPointsAndWallet"; |
no test coverage detected