MCPcopy Create free account
hub / github.com/smallfawn/QLScriptPublic / fetchLoginKey

Method fetchLoginKey

wxapp/hisense_aijia.js:416–430  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

414 }
415
416 async fetchLoginKey() {
417 if (!this.accessToken || this.loginKey) return;
418 const res = await request("GET", ACCOUNT_BASE, "/mobile/st/getLoginKey", {
419 accessToken: this.accessToken,
420 keyType: 1,
421 }, { signType: "WEB_CN_GW" });
422 const data = res.data?.data || {};
423 if (res.status === 200 && Number(data.resultCode) === 0 && data.loginKey) {
424 this.loginKey = data.loginKey;
425 this.saveCache({ loginKey: this.loginKey });
426 $.log(`账号[${this.index}] loginKey 已缓存`);
427 } else {
428 $.log(`账号[${this.index}] loginKey 获取失败: ${short(res.data, 300)}`);
429 }
430 }
431
432 async loginByPhoneAuth() {
433 let op = {};

Callers

nothing calls this directly

Calls 4

saveCacheMethod · 0.95
requestFunction · 0.70
shortFunction · 0.70
logMethod · 0.45

Tested by

no test coverage detected