From b7a90ef9f8e283e595203a569fe8e02c71458bc0 Mon Sep 17 00:00:00 2001 From: AceDataCloud Date: Sun, 7 Jan 2024 21:53:57 +0800 Subject: [PATCH] Fix invitee page (#38) --- ...zhishuyun-hub-2e9ae7a3-e271-40f5-9e5f-171627667be9.json | 7 +++++++ src/operators/user/operator.ts | 1 + src/pages/distribution/Invitees.vue | 5 +++-- src/router/distribution.ts | 2 +- 4 files changed, 12 insertions(+), 3 deletions(-) create mode 100644 change/@zhishuyun-hub-2e9ae7a3-e271-40f5-9e5f-171627667be9.json diff --git a/change/@zhishuyun-hub-2e9ae7a3-e271-40f5-9e5f-171627667be9.json b/change/@zhishuyun-hub-2e9ae7a3-e271-40f5-9e5f-171627667be9.json new file mode 100644 index 00000000..9f51e7ad --- /dev/null +++ b/change/@zhishuyun-hub-2e9ae7a3-e271-40f5-9e5f-171627667be9.json @@ -0,0 +1,7 @@ +{ + "type": "patch", + "comment": "fix invitee page", + "packageName": "@zhishuyun/hub", + "email": "cqc@germey.cn", + "dependentChangeType": "patch" +} diff --git a/src/operators/user/operator.ts b/src/operators/user/operator.ts index e4c46afd..3e5a71f2 100644 --- a/src/operators/user/operator.ts +++ b/src/operators/user/operator.ts @@ -5,6 +5,7 @@ import { IUserDetailResponse, IUser, IUserListResponse } from './models'; export interface IInviteesQuery { offset?: number; limit?: number; + ordering?: string; } class UserOperator { diff --git a/src/pages/distribution/Invitees.vue b/src/pages/distribution/Invitees.vue index 39c5a776..0d4dba44 100644 --- a/src/pages/distribution/Invitees.vue +++ b/src/pages/distribution/Invitees.vue @@ -28,7 +28,7 @@ {{ scope.row.nickname }} - + @@ -123,7 +123,8 @@ export default defineComponent({ async onFetchInvitees() { const { data } = await userOperator.getInvitees({ limit: this.limit, - offset: (this.page - 1) * this.limit + offset: (this.page - 1) * this.limit, + ordering: '-created_at' }); this.invitees = data.items; this.total = data.count; diff --git a/src/router/distribution.ts b/src/router/distribution.ts index 4fc1b80d..ec84b75e 100644 --- a/src/router/distribution.ts +++ b/src/router/distribution.ts @@ -20,7 +20,7 @@ export default { { path: 'invitees', name: ROUTE_DISTRIBUTION_INVITEES, - component: () => import('@/pages/distribution/History.vue') + component: () => import('@/pages/distribution/Invitees.vue') } ] };