This commit is contained in:
2024-04-10 14:46:29 +08:00
parent c94ddeed1a
commit 222bae69d9
14 changed files with 304 additions and 213 deletions

View File

@@ -1,12 +1,10 @@
import { get, post } from '@/utils';
import { get } from '@/utils';
import { CategoryBean, GoodsBean } from '@/api/goods/types';
enum URL {
categoryList = '/ext/goods/category_list',
goodsList = '/ext/goods/query',
goodsDetail = '/ext/goods/info',
orderCreate = '/sales/wx_order_create',
orderList = '/sales/wx_query',
goodsDetail = '/ext/goods/info'
}
export const getCategoryList = () => get<CategoryBean[]>({ url: URL.categoryList });
@@ -14,14 +12,3 @@ export const getCategoryList = () => get<CategoryBean[]>({ url: URL.categoryList
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 });