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() {