♻️ 请求重构,合并postWapi跟apiHub相关请求

This commit is contained in:
目棃
2024-10-24 23:08:34 +08:00
parent 41db04b7a2
commit 26041948ef
31 changed files with 399 additions and 594 deletions

View File

@@ -1,7 +1,7 @@
/**
* @file utils/TGWindow.ts
* @description 窗口创建相关工具函数
* @since Beta v0.5.0
* @since Beta v0.6.2
*/
import { core, window as TauriWindow } from "@tauri-apps/api";
@@ -70,3 +70,15 @@ export async function createPost(
console.error(err);
});
}
/**
* @description 打开观测枢
* @since Beta 0.6.2
* @param {string} contentId
* @param {string} label
* @returns {Promise<void>}
*/
export async function createObc(contentId: number, label: string): Promise<void> {
const obcUrl = `https://bbs.mihoyo.com/ys/obc/content/${contentId}/detail?bbs_presentation_style=no_header`;
await createTGWindow(obcUrl, "Sub_window", `Content_${contentId}_${label}`, 1200, 800, true);
}