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 0000000..9f51e7a --- /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 e4c46af..3e5a71f 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 39c5a77..0d4dba4 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 4fc1b80..ec84b75 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') } ] };