feat: add post page

This commit is contained in:
yanghao05
2025-04-09 16:40:34 +08:00
parent aa8077937f
commit 6151f4e244
8 changed files with 457 additions and 91 deletions

View File

@@ -0,0 +1,12 @@
import httpClient from './httpClient';
export const postService = {
getPosts({ page = 1, limit = 10 } = {}) {
return httpClient.get('/admin/posts', {
params: { page, limit }
});
},
getPost(id) {
return httpClient.get(`/admin/posts/${id}`);
},
};