diff --git a/backend/app/api/v1/favorite.go b/backend/app/api/v1/favorite.go index 53253ee1c..5cd1d57fe 100644 --- a/backend/app/api/v1/favorite.go +++ b/backend/app/api/v1/favorite.go @@ -18,7 +18,7 @@ import ( // @Router /files/favorite/search [post] func (b *BaseApi) SearchFavorite(c *gin.Context) { var req dto.PageInfo - if err := helper.CheckBind(req, c); err != nil { + if err := helper.CheckBindAndValidate(&req, c); err != nil { return } total, list, err := favoriteService.Page(req) diff --git a/frontend/src/views/host/file-management/favorite/index.vue b/frontend/src/views/host/file-management/favorite/index.vue index fb4018bea..d22d409d4 100644 --- a/frontend/src/views/host/file-management/favorite/index.vue +++ b/frontend/src/views/host/file-management/favorite/index.vue @@ -18,12 +18,12 @@ import { reactive, ref } from 'vue'; const paginationConfig = reactive({ cacheSizeKey: 'favorite-page-size', currentPage: 1, - pageSize: 100, + pageSize: 20, total: 0, }); const req = reactive({ page: 1, - pageSize: 100, + pageSize: 20, }); const open = ref(false); const data = ref([]); @@ -40,6 +40,8 @@ const acceptParams = () => { const search = async () => { try { + req.page = paginationConfig.currentPage; + req.pageSize = paginationConfig.pageSize; const res = await SearchFavorite(req); data.value = res.data.items; paginationConfig.total = res.data.total; diff --git a/frontend/src/views/host/file-management/recycle-bin/index.vue b/frontend/src/views/host/file-management/recycle-bin/index.vue index c27f79140..bc55cdb53 100644 --- a/frontend/src/views/host/file-management/recycle-bin/index.vue +++ b/frontend/src/views/host/file-management/recycle-bin/index.vue @@ -55,7 +55,7 @@ import Delete from './delete/index.vue'; const open = ref(false); const req = reactive({ page: 1, - pageSize: 100, + pageSize: 20, }); const data = ref([]); const em = defineEmits(['close']); @@ -66,7 +66,7 @@ const files = ref([]); const paginationConfig = reactive({ cacheSizeKey: 'recycle-page-size', currentPage: 1, - pageSize: 100, + pageSize: 20, total: 0, }); @@ -87,6 +87,8 @@ const acceptParams = () => { const search = async () => { try { + req.page = paginationConfig.currentPage; + req.pageSize = paginationConfig.pageSize; const res = await getRecycleList(req); data.value = res.data.items; paginationConfig.total = res.data.total;