Skip to content

Commit

Permalink
Fix distribution level display (#39)
Browse files Browse the repository at this point in the history
  • Loading branch information
AceDataCloud committed Jan 7, 2024
1 parent be07f64 commit f362808
Show file tree
Hide file tree
Showing 3 changed files with 18 additions and 3 deletions.
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
{
"type": "patch",
"comment": "fix distribution level",
"packageName": "@zhishuyun/hub",
"email": "cqc@germey.cn",
"dependentChangeType": "patch"
}
10 changes: 8 additions & 2 deletions src/operators/distribution/operator.ts
Original file line number Diff line number Diff line change
Expand Up @@ -46,11 +46,17 @@ class DistributionStatusService {

export const distributionStatusOperator = new DistributionStatusService();

export interface IDistributionLevelQuery {
limit?: number;
}

class DistributionLevelService {
key = 'distribution-levels';

async getAll(): Promise<AxiosResponse<IDistributionLevelListResponse>> {
return await httpClient.get(`/${this.key}/`);
async getAll(query: IDistributionLevelQuery): Promise<AxiosResponse<IDistributionLevelListResponse>> {
return await httpClient.get(`/${this.key}/`, {
params: query
});
}
}

Expand Down
4 changes: 3 additions & 1 deletion src/pages/distribution/Index.vue
Original file line number Diff line number Diff line change
Expand Up @@ -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() {
Expand Down

0 comments on commit f362808

Please sign in to comment.