基本实现了订单、购物车、商品等模块,商城v1.0

This commit is contained in:
puzvv
2025-12-20 20:41:30 +08:00
parent 57fe499080
commit bde3870243
12 changed files with 2008 additions and 19 deletions

25
src/apis/order.ts Normal file
View 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 },
});
};