🐛 修复部分 eslint 报错

This commit is contained in:
BTMuli
2023-06-25 16:57:55 +08:00
parent 7567bba147
commit 9f9a1de09f
11 changed files with 48 additions and 37 deletions

View File

@@ -26,12 +26,14 @@ export async function getGameRoleListByLToken(
const uid = account.gameUid;
// eslint-disable-next-line camelcase
const data = { role_id: uid, server: TGUtils.Tools.getServerByUid(uid) };
const header = TGUtils.User.getHeader(
cookie as unknown as Record<string, string>,
"POST",
JSON.stringify(data),
"common",
);
// 格式转换 将 cookie 对象转换 record<string, string>
const ck: Record<string, string> = {
account_id: cookie.account_id,
cookie_token: cookie.cookie_token,
ltuid: cookie.ltuid,
ltoken: cookie.ltoken,
};
const header = TGUtils.User.getHeader(ck, "POST", JSON.stringify(data), "common");
return await http
.fetch<TGApp.Game.Character.ListResponse>(url, {
method: "POST",