- 在统计页面中引入营养摄入分析卡片,展示用户的营养数据 - 更新探索页面,增加营养数据加载逻辑,确保用户体验一致性 - 移除不再使用的推荐文章逻辑,简化代码结构 - 更新路由常量,确保路径管理集中化 - 优化体重历史记录卡片,提升用户交互体验
17 lines
323 B
TypeScript
17 lines
323 B
TypeScript
import { api } from './api';
|
|
|
|
export type Article = {
|
|
id: string;
|
|
title: string;
|
|
coverImage: string;
|
|
htmlContent: string;
|
|
publishedAt: string; // ISO string
|
|
readCount: number;
|
|
};
|
|
|
|
export async function getArticleById(id: string): Promise<Article | undefined> {
|
|
return api.get<Article>(`/articles/${id}`);
|
|
}
|
|
|
|
|