From f902314402aac255a6f2bd4d2fac6bef4dd29b6b Mon Sep 17 00:00:00 2001 From: Germey Tsui Date: Sun, 7 Jan 2024 22:34:08 +0800 Subject: [PATCH] fix dis level --- src/operators/distribution/operator.ts | 10 ++++++++-- src/pages/distribution/Index.vue | 4 +++- 2 files changed, 11 insertions(+), 3 deletions(-) diff --git a/src/operators/distribution/operator.ts b/src/operators/distribution/operator.ts index d62067b..58f35c6 100644 --- a/src/operators/distribution/operator.ts +++ b/src/operators/distribution/operator.ts @@ -46,11 +46,17 @@ class DistributionStatusService { export const distributionStatusOperator = new DistributionStatusService(); +export interface IDistributionLevelQuery { + limit?: number; +} + class DistributionLevelService { key = 'distribution-levels'; - async getAll(): Promise> { - return await httpClient.get(`/${this.key}/`); + async getAll(query: IDistributionLevelQuery): Promise> { + return await httpClient.get(`/${this.key}/`, { + params: query + }); } } diff --git a/src/pages/distribution/Index.vue b/src/pages/distribution/Index.vue index 0790082..49e6357 100644 --- a/src/pages/distribution/Index.vue +++ b/src/pages/distribution/Index.vue @@ -324,7 +324,9 @@ export default defineComponent({ } }, async onFetchDistributionLevels() { - const { data } = await distributionLevelOperator.getAll(); + const { data } = await distributionLevelOperator.getAll({ + limit: 20 + }); this.distributionLevels = data.items; }, async onFetchInvitees() {