商品团购分享处理

This commit is contained in:
2024-06-07 14:10:43 +08:00
parent 613c0df738
commit 4b4ee44242
10 changed files with 53 additions and 26 deletions

View File

@@ -1,14 +1,16 @@
import { get } from '@/utils';
import { get, post } from '@/utils';
import { CategoryBean, GoodsBean } from '@/api/goods/types';
enum URL {
categoryList = '/ext/goods/category_list',
goodsList = '/ext/goods/query',
goodsDetail = '/ext/goods/info'
goodsDetail = '/ext/goods/info',
shareGoodsDetail = '/wechat/coupons/group/qrcode'
}
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}` });