商品团购券分享处理

This commit is contained in:
2024-06-08 17:05:25 +08:00
parent 4b4ee44242
commit a620ecf624
12 changed files with 352 additions and 50 deletions

View File

@@ -1,16 +1,14 @@
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',
shareGoodsDetail = '/wechat/coupons/group/qrcode'
goodsDetail = '/ext/goods/info'
}
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 getShareGoodsDetail = (shareId: string) => post<GoodsBean>({ url: URL.shareGoodsDetail + `/${shareId}` });