mirror of
https://github.com/BTMuli/TeyvatGuide.git
synced 2025-12-13 09:28:14 +08:00
♻️ 请求重构,合并postWapi跟apiHub相关请求
This commit is contained in:
@@ -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);
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user