mirror of
https://github.com/BTMuli/TeyvatGuide.git
synced 2025-12-15 09:48:14 +08:00
feat(Mys): 添加结构化内容接口,明天起来完善各种类型的渲染
This commit is contained in:
@@ -64,7 +64,7 @@ import { fs, http } from "@tauri-apps/api";
|
||||
import useAppStore from "../store/modules/app";
|
||||
// utils
|
||||
import { createTGWindow } from "../utils/TGWindow";
|
||||
import { parseMys } from "../utils/MysParse";
|
||||
import { StructuredPostParser } from "../plugins/Mys/utils/parser";
|
||||
// interface
|
||||
import {
|
||||
GachaResponse,
|
||||
@@ -180,7 +180,7 @@ async function toPost(post_id: string) {
|
||||
return res.data.post.post;
|
||||
});
|
||||
// 结构化渲染
|
||||
const parseDoc = parseMys(post.structured_content);
|
||||
const parseDoc = StructuredPostParser(post.structured_content);
|
||||
// 将解析后的 doc 保存到 文件
|
||||
await fs.writeTextFile(
|
||||
`${appStore.dataPath.temp}\\${post_id}_home.html`,
|
||||
|
||||
Reference in New Issue
Block a user