From 060521d34cf5af4431c31b0c36a4ec07f0212cc8 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E5=B4=94=E5=BA=86=E6=89=8D=E4=B8=A8=E9=9D=99=E8=A7=85?= Date: Sun, 7 Jan 2024 22:36:43 +0800 Subject: [PATCH] Fix distribution level display (#39) --- ...huyun-hub-336c7865-8584-4078-9006-0ee04d8bf4f4.json | 7 +++++++ src/operators/distribution/operator.ts | 10 ++++++++-- src/pages/distribution/Index.vue | 4 +++- 3 files changed, 18 insertions(+), 3 deletions(-) create mode 100644 change/@zhishuyun-hub-336c7865-8584-4078-9006-0ee04d8bf4f4.json diff --git a/change/@zhishuyun-hub-336c7865-8584-4078-9006-0ee04d8bf4f4.json b/change/@zhishuyun-hub-336c7865-8584-4078-9006-0ee04d8bf4f4.json new file mode 100644 index 0000000..66d8834 --- /dev/null +++ b/change/@zhishuyun-hub-336c7865-8584-4078-9006-0ee04d8bf4f4.json @@ -0,0 +1,7 @@ +{ + "type": "patch", + "comment": "fix distribution level", + "packageName": "@zhishuyun/hub", + "email": "cqc@germey.cn", + "dependentChangeType": "patch" +} 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() {