2
0
mirror of https://github.com/ctrlcvs/xiaoyao-cvs-plugin.git synced 2024-12-23 03:20:52 +08:00

修正刷新ck报错

This commit is contained in:
Ctrlcvs 2022-09-16 13:32:46 +08:00
parent 03883430a1
commit c3111f794a

View File

@ -270,8 +270,10 @@ export default class MihoYoApi {
return resObj
}
async updCookie(){
let url = `https://api-takumi.mihoyo.com/auth/api/getCookieAccountInfoBySToken`;
let res = await superagent.get(url).set(this._getHeader()).timeout(10000);
let url = `${web_api}/auth/api/getCookieAccountInfoBySToken?game_biz=hk4e_cn`;
let map=this.getCookieMap(this.cookies)
url+=`&stoken=${map.get("stoken")}&uid=${map.get("stuid")}`;
let res = await superagent.get(url);
let resObj = JSON.parse(res.text);
return resObj;
}