fix: list query issues

This commit is contained in:
yanghao05
2025-04-09 17:25:41 +08:00
parent 1f4c05c54a
commit 05d368ef25
6 changed files with 43 additions and 17 deletions

View File

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