mirror of
https://github.com/BTMuli/TeyvatGuide.git
synced 2025-12-12 09:18:14 +08:00
🎨 完善请求
This commit is contained in:
@@ -1,8 +1,7 @@
|
||||
/**
|
||||
* @file web request getUserInfo.ts
|
||||
* @description 获取用户信息请求
|
||||
* @author BTMuli<bt-muli@outlook.com>
|
||||
* @since Beta v0.3.0
|
||||
* @since Beta v0.3.3
|
||||
*/
|
||||
|
||||
// tauri
|
||||
@@ -14,7 +13,7 @@ import TGUtils from "../utils/TGUtils";
|
||||
|
||||
/**
|
||||
* @description 根据 cookie 获取用户信息
|
||||
* @since Beta v0.3.0
|
||||
* @since Beta v0.3.3
|
||||
* @param {string} cookie_token cookie token
|
||||
* @param {string} account_id 用户 account_id
|
||||
* @returns {Promise<TGApp.App.Account.BriefInfo | TGApp.BBS.Response.Base>}
|
||||
@@ -29,7 +28,7 @@ export async function getUserInfoByCookie(
|
||||
};
|
||||
const url = TGApi.GameData.byCookie.getUserInfo;
|
||||
const params = { gids: "2" };
|
||||
const header = TGUtils.User.getHeader(cookie, "GET", {}, "common", true);
|
||||
const header = TGUtils.User.getHeader(cookie, "GET", params, "common", true);
|
||||
return await http
|
||||
.fetch<TGApp.Plugins.Mys.User.HomeResponse>(url, {
|
||||
method: "GET",
|
||||
|
||||
Reference in New Issue
Block a user