Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix distribution level display #39

Merged
merged 2 commits into from
Jan 7, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
{
"type": "patch",
"comment": "fix distribution level",
"packageName": "@zhishuyun/hub",
"email": "[email protected]",
"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