feat: 医护仪表盘增强 + 患者端文章分类浏览
- DoctorDashboard 增加 pending_dialysis_review/pending_lab_review/today_appointments - 医护小程序首页增加「健康审核」区块(待审透析/化验/今日预约) - 患者端文章列表增加分类 tabs 横向滚动筛选 - article service 增加 listCategories + category_id 筛选
This commit is contained in:
@@ -7,17 +7,40 @@ export interface Article {
|
||||
content?: string;
|
||||
cover_image?: string;
|
||||
category?: string;
|
||||
category_id?: string;
|
||||
category_name?: string;
|
||||
tags?: { id: string; name: string }[];
|
||||
published_at?: string;
|
||||
author?: string;
|
||||
view_count?: number;
|
||||
}
|
||||
|
||||
export async function listArticles(page = 1) {
|
||||
export interface ArticleCategory {
|
||||
id: string;
|
||||
name: string;
|
||||
parent_id?: string;
|
||||
children?: ArticleCategory[];
|
||||
}
|
||||
|
||||
export async function listArticles(params?: {
|
||||
page?: number;
|
||||
page_size?: number;
|
||||
category_id?: string;
|
||||
tag_id?: string;
|
||||
keyword?: string;
|
||||
}) {
|
||||
return api.get<{ data: Article[]; total: number }>('/health/articles', {
|
||||
page,
|
||||
page_size: 20,
|
||||
page: params?.page ?? 1,
|
||||
page_size: params?.page_size ?? 20,
|
||||
status: 'published',
|
||||
...params,
|
||||
});
|
||||
}
|
||||
|
||||
export async function getArticleDetail(id: string) {
|
||||
return api.get<Article>(`/health/articles/${id}`);
|
||||
}
|
||||
|
||||
export async function listCategories() {
|
||||
return api.get<ArticleCategory[]>('/health/article-categories');
|
||||
}
|
||||
|
||||
@@ -8,6 +8,9 @@ export interface DoctorDashboard {
|
||||
unread_messages: number;
|
||||
pending_follow_ups: number;
|
||||
today_consultations: number;
|
||||
pending_dialysis_review: number;
|
||||
pending_lab_review: number;
|
||||
today_appointments: number;
|
||||
}
|
||||
|
||||
export async function getDashboard() {
|
||||
|
||||
Reference in New Issue
Block a user