mirror of
https://github.com/BTMuli/TeyvatGuide.git
synced 2025-12-11 09:08:14 +08:00
🏷️ 修复遗漏的 types
This commit is contained in:
@@ -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();
|
||||
|
||||
@@ -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];
|
||||
}
|
||||
|
||||
@@ -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, {
|
||||
|
||||
Reference in New Issue
Block a user