| 213 | } |
| 214 | |
| 215 | async function createAuth(profile, cookie) { |
| 216 | const { data, status } = await axios.request({ |
| 217 | method: "POST", |
| 218 | url: "https://sdi.m.qq.com/public/auth/create", |
| 219 | headers: { |
| 220 | "User-Agent": USER_AGENT, |
| 221 | "Content-Type": "application/json", |
| 222 | "sec-ch-ua": '"Chromium";v="109"', |
| 223 | sdiaid: SDIAID, |
| 224 | "sec-ch-ua-mobile": "?0", |
| 225 | "sec-ch-ua-platform": '"Windows"', |
| 226 | Origin: "https://sdi.3g.qq.com", |
| 227 | "Sec-Fetch-Site": "same-site", |
| 228 | "Sec-Fetch-Mode": "cors", |
| 229 | "Sec-Fetch-Dest": "empty", |
| 230 | Referer: "https://sdi.3g.qq.com/", |
| 231 | "Accept-Language": "zh-CN,zh;q=0.9", |
| 232 | Cookie: cookie, |
| 233 | }, |
| 234 | data: { |
| 235 | loginKey: profile.loginKey, |
| 236 | openid: profile.openid, |
| 237 | nickname: profile.nickname, |
| 238 | account: Number(profile.account) || profile.account, |
| 239 | userId: Number(profile.userId) || profile.userId, |
| 240 | headimgurl: profile.headimgurl, |
| 241 | guid: profile.guid, |
| 242 | imei: Number(profile.imei) || profile.imei, |
| 243 | loginType: "wx", |
| 244 | platformId: "pcmgr16", |
| 245 | loginAccType: 2, |
| 246 | }, |
| 247 | timeout: 20000, |
| 248 | validateStatus: () => true, |
| 249 | }); |
| 250 | return { status, data }; |
| 251 | } |
| 252 | |
| 253 | async function doLottery(sessionKey, cookie) { |
| 254 | const { data, status } = await axios.request({ |