优化
This commit is contained in:
@@ -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}` });
|
||||
|
Reference in New Issue
Block a user