diff --git a/src/i18n/zh/index.ts b/src/i18n/zh/index.ts index 5a0459f8..650900fe 100644 --- a/src/i18n/zh/index.ts +++ b/src/i18n/zh/index.ts @@ -5,6 +5,7 @@ import service from './service/index'; import console from './console/index'; import application from './application'; import api from './api'; +import order from './order'; export default { common, @@ -13,5 +14,6 @@ export default { service, console, application, - api + api, + order }; diff --git a/src/i18n/zh/order/button.ts b/src/i18n/zh/order/button.ts new file mode 100644 index 00000000..f2685fb2 --- /dev/null +++ b/src/i18n/zh/order/button.ts @@ -0,0 +1,4 @@ +export default { + pay: '支付', + continuePay: '继续支付' +}; diff --git a/src/i18n/zh/order/field.ts b/src/i18n/zh/order/field.ts new file mode 100644 index 00000000..b0c926c0 --- /dev/null +++ b/src/i18n/zh/order/field.ts @@ -0,0 +1,7 @@ +export default { + id: '订单号', + amount: '金额', + price: '金额', + description: '订单描述', + state: '状态' +}; diff --git a/src/i18n/zh/order/index.ts b/src/i18n/zh/order/index.ts new file mode 100644 index 00000000..3cd536a7 --- /dev/null +++ b/src/i18n/zh/order/index.ts @@ -0,0 +1,9 @@ +import field from './field'; +import button from './button'; +import message from './message'; + +export default { + field, + button, + message +}; diff --git a/src/i18n/zh/order/message.ts b/src/i18n/zh/order/message.ts new file mode 100644 index 00000000..ff8b4c56 --- /dev/null +++ b/src/i18n/zh/order/message.ts @@ -0,0 +1 @@ +export default {}; diff --git a/src/operators/order/operator.ts b/src/operators/order/operator.ts index af4ae676..d2ecafa7 100644 --- a/src/operators/order/operator.ts +++ b/src/operators/order/operator.ts @@ -2,11 +2,19 @@ import { AxiosResponse } from 'axios'; import { httpClient } from '../instance'; import { IOrder, IOrderDetailResponse, IOrderListResponse } from './models'; +export interface IOrderQuery { + user_id?: string; + offset?: number; + limit?: number; +} + class OrderService { key = 'orders'; - async getAll(): Promise> { - return await httpClient.get(`/${this.key}/`); + async getAll(query: IOrderQuery): Promise> { + return await httpClient.get(`/${this.key}/`, { + params: query + }); } async get(id: string): Promise> { diff --git a/src/pages/console/order/List.vue b/src/pages/console/order/List.vue index e69de29b..afe505e9 100644 --- a/src/pages/console/order/List.vue +++ b/src/pages/console/order/List.vue @@ -0,0 +1,167 @@ + + + +