diff --git a/community-fresh-group-buy-frontend/src/api/modules/order.ts b/community-fresh-group-buy-frontend/src/api/modules/order.ts index 1b2666e..aa432a4 100644 --- a/community-fresh-group-buy-frontend/src/api/modules/order.ts +++ b/community-fresh-group-buy-frontend/src/api/modules/order.ts @@ -57,8 +57,9 @@ export const orderApi = { })) }, - getList(params?: PageParams & { status?: string }): Promise>> { + getList(params?: PageParams & { status?: string; userId?: number }): Promise>> { return request.post>>('/api/order/my-orders', { + userId: params?.userId, status: orderStatusToCode(params?.status), page: params?.page ?? 0, size: params?.size ?? 10, @@ -122,7 +123,7 @@ export const orderApi = { return request.delete(`/api/order/${id}`) }, - getStatistics(): Promise> { - return request.get>('/api/order/statistics').then((res) => ({ + return request.get>('/api/order/statistics', userId ? {userId} : undefined).then((res) => ({ ...res, data: { total: Number(res.data.totalOrders || 0), diff --git a/community-fresh-group-buy-frontend/src/components/common/SearchComponent.vue b/community-fresh-group-buy-frontend/src/components/common/SearchComponent.vue index 48922e6..42d5d2e 100644 --- a/community-fresh-group-buy-frontend/src/components/common/SearchComponent.vue +++ b/community-fresh-group-buy-frontend/src/components/common/SearchComponent.vue @@ -58,22 +58,6 @@ - -
-
- 热门搜索 -
-
- - {{ item }} - -
-
-
@@ -116,7 +100,7 @@ - + @@ -157,7 +141,7 @@