Feat: Add Note List & Detail Page

日记列表与详情页面,包括载入条和文章组件
This commit is contained in:
2023-11-06 01:55:58 +08:00
parent e2704ddb1d
commit db8a91e6ee
11 changed files with 271 additions and 3 deletions
+7
View File
@@ -0,0 +1,7 @@
declare namespace API {
interface Response<D> {
status: "Success" | "Failed";
msg: string;
data: D;
}
}
+69
View File
@@ -0,0 +1,69 @@
declare namespace API {
namespace Note {
enum NoteType {
Private,
Friends,
Limited,
Public,
}
interface INoteMusic {
id: number;
type?: "netease";
title: string;
artist: string;
album: string;
cover: string;
}
interface INoteQuery {
page: number;
year?: number;
month?: number;
search?: string;
}
interface INoteDetailQuery {
id: number;
year?: number;
}
// 旧数据兼容
interface INotePhotoData {
year: number | string;
name: string;
type: string;
url: string;
}
interface INoteData {
id: number;
title: string;
content: string;
except: string;
content_html: string;
date: string;
mood: number;
weather: number;
status: number;
type: NoteType;
time_spent: number;
music?: INoteMusic;
starred: boolean;
unlocked?: boolean;
media: any[];
photo?: INotePhotoData[];
year?: string;
time: number;
likes: number;
created_at: string;
updated_at: string;
}
}
}