This commit is contained in:
2024-03-29 14:55:40 +08:00
parent 91af869899
commit 51c708f9fa
10 changed files with 133 additions and 56 deletions

View File

@@ -5,11 +5,22 @@ enum URL {
categoryList = '/ext/goods/category_list',
goodsList = '/ext/goods/query',
goodsDetail = '/ext/goods/info',
order = '/user/logout',
orderCreate = '/sales/wx_order_create',
orderList = '/sales/wx_query',
}
export const getCategoryList = () => get<CategoryBean>({ url: URL.categoryList });
export const getCategoryList = () => get<CategoryBean[]>({ url: URL.categoryList });
export const getGoodsList = (params: any) => get<GoodsBean>({ url: URL.goodsList, data: params });
export const getGoodsList = (params: any) => get<GoodsBean[]>({ url: URL.goodsList, data: params });
export const getGoodsDetail = (goodsId: string) => get<GoodsBean>({ url: URL.goodsDetail + `?goodsId=${goodsId}` });
export const orderCreate = (data: any) => post({ url: URL.orderCreate, data });
export const getOrderList = (data: {
pageNum: number,
pageSize: number,
obj: {
payStatus: number
}
}) => post({ url: URL.orderList, data });