This commit is contained in:
2024-03-18 21:52:10 +08:00
parent 7f0f11cf14
commit 8d7f82b07c
13 changed files with 187 additions and 108 deletions

View File

@@ -1,14 +1,15 @@
import { get, post } from '@/utils';
import { CategoryBean, GoodsBean } from '@/api/goods/types';
enum URL {
categoryList = '/ext//goods/category_list',
categoryList = '/ext/goods/category_list',
goodsList = '/ext/goods/query',
goodsDetail = '/ext/goods/info',
order = '/user/logout',
}
export const getCategoryList = (companyId: string) => get({ url: URL.categoryList + `?companyId=${companyId}` });
export const getCategoryList = () => get<CategoryBean>({ url: URL.categoryList });
export const getGoodsList = (params: any) => post({ url: URL.goodsList, data: params });
export const getGoodsList = (params: any) => post<GoodsBean>({ url: URL.goodsList, data: params });
export const getGoodsDetail = () => get({ url: URL.goodsDetail });
export const getGoodsDetail = (goodsId: string) => get<GoodsBean>({ url: URL.goodsDetail + `?goodsId=${goodsId}` });