基本实现了订单、购物车、商品等模块,商城v1.0
This commit is contained in:
25
src/apis/order.ts
Normal file
25
src/apis/order.ts
Normal file
@@ -0,0 +1,25 @@
|
||||
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 },
|
||||
});
|
||||
};
|
||||
Reference in New Issue
Block a user