26 lines
521 B
TypeScript
26 lines
521 B
TypeScript
|
|
import http from "../utils/http";
|
||
|
|
import type {
|
||
|
|
// OrderListItem,
|
||
|
|
OrderDetail,
|
||
|
|
OrderPageParams,
|
||
|
|
OrderPageResponse,
|
||
|
|
} from "@/types/order";
|
||
|
|
|
||
|
|
// 获取订单列表
|
||
|
|
export const getOrderList = (params: OrderPageParams) => {
|
||
|
|
return http<OrderPageResponse>({
|
||
|
|
url: "/order/page",
|
||
|
|
method: "get",
|
||
|
|
params,
|
||
|
|
});
|
||
|
|
};
|
||
|
|
|
||
|
|
// 获取订单详情
|
||
|
|
export const getOrderDetail = (id: number, userId: number) => {
|
||
|
|
return http<OrderDetail>({
|
||
|
|
url: `/order/${id}`,
|
||
|
|
method: "get",
|
||
|
|
params: { userId },
|
||
|
|
});
|
||
|
|
};
|