add tiptap

This commit is contained in:
Timi
2026-08-21 01:11:23 +08:00
parent 763783b984
commit 68d9946b70
41 changed files with 5845 additions and 35 deletions
+3 -3
View File
@@ -1,4 +1,4 @@
import { ArticleView } from "../types";
import type { Article } from "../types";
import { axios } from "./BaseAPI";
/**
@@ -7,7 +7,7 @@ import { axios } from "./BaseAPI";
* @param id 文章 ID
* @returns 文章数据
*/
async function view(id: string): Promise<ArticleView<any>> {
async function view(id: string): Promise<Article> {
return axios.get(`/article/${id}`);
}
@@ -23,5 +23,5 @@ async function like(id: string): Promise<number> {
export default {
view,
like,
like
};
+8
View File
@@ -3,6 +3,13 @@ import type { NotifyDetail, Page, PageResult } from "../types";
const BASE_URI = "/notify/internal";
/** 查询当前用户的站内通知详情。 */
async function internalDetail(id: string): Promise<NotifyDetail> {
return await axios.post(`${BASE_URI}/detail`, undefined, {
params: { id }
});
}
/** 查询当前用户的站内通知。 */
async function listInternal(page?: Page<NotifyDetail>, unreadOnly = false): Promise<PageResult<NotifyDetail>> {
return await axios.post(`${BASE_URI}/internal`, page, {
@@ -28,6 +35,7 @@ async function markAllInternalRead(): Promise<void> {
}
export default {
internalDetail,
listInternal,
countUnreadInternal,
markInternalRead,