🏷️ 修复遗漏的 types

This commit is contained in:
BTMuli
2023-05-23 23:58:21 +08:00
parent 215e77b811
commit b8f7b73f05
3 changed files with 7 additions and 7 deletions

View File

@@ -26,7 +26,7 @@ const abyssCookie = ref({
ltoken: "",
ltuid: "",
});
const user = ref({} as TGApp.User.Account.Game);
const user = ref({} as TGApp.Sqlite.Account.Game);
onMounted(async () => {
const curUser = await TGSqlite.getCurAccount();

View File

@@ -118,12 +118,12 @@ class TGSqlite {
* @description 获取当前选择的游戏账号
* @memberOf TGSqlite
* @since Alpha v0.2.0
* @returns {Promise<TGApp.User.Account.Game|false>}
* @returns {Promise<TGApp.Sqlite.Account.Game|false>}
*/
public async getCurAccount (): Promise<TGApp.User.Account.Game | false> {
public async getCurAccount (): Promise<TGApp.Sqlite.Account.Game | false> {
const db = await Database.load(this.dbPath);
const sql = "SELECT * FROM GameAccount WHERE isChosen=1;";
const res: TGApp.User.Account.Game[] = await db.select(sql);
const res: TGApp.Sqlite.Account.Game[] = await db.select(sql);
await db.close();
return res.length === 0 ? false : res[0];
}

View File

@@ -18,12 +18,12 @@ import { getRequestHeader } from "../utils/getRequestHeader";
* @since Alpha v0.2.0
* @param {Record<string, string>} cookie cookie
* @param {string} schedule_type 0: 本期, 1: 上期
* @param {TGApp.User.Game.Account} account 游戏账号
* @param {TGApp.Sqlite.Account.Game} account 游戏账号
* @returns {Promise<TGApp.Game.Abyss.FullData|TGApp.App.Base.Response>}
*/
export async function getAbyss (cookie: Record<string, string>, schedule_type: string, account: TGApp.User.Account.Game): Promise<TGApp.Game.Abyss.FullData | TGApp.BBS.Response.Base> {
export async function getAbyss (cookie: Record<string, string>, schedule_type: string, account: TGApp.Sqlite.Account.Game): Promise<TGApp.Game.Abyss.FullData | TGApp.BBS.Response.Base> {
const url = TGApi.GameData.getAbyss;
const role_id = account.game_uid;
const role_id = account.gameUid;
const params = { role_id, schedule_type, server: getServerByUid(role_id) };
const header = getRequestHeader(cookie, "GET", params, "common");
return await http.fetch<TGApp.Game.Abyss.Response>(url, {