import { Service } from '@/Service/Service';
export class GoodsService {
    /**
     * 首页接口
     * GET /api/Goods/GetGoodsList
     */
    static async GetGoodsList(page: number) {
        return await Service.Request( "/api/Goods/GetGoodsList","GET", { page });
    }

    /**
     * 搜索商品接口
     * GET /api/Goods/GetSerchGoodsList
     */
    static async GetSerchGoodsList(name: string, page: number) {
        return await Service.Request("/api/Goods/GetSerchGoodsList","GET", { name, page });
    }

    /**
     * 商品详情接口
     * GET /api/Goods/GetGoodsInfo
     */
    static async GetGoodsInfo(goodsId: string) {
        return await Service.Request( "/api/Goods/GetGoodsInfo","GET", { goodsId });
    }

    /**
     * 分类接口
     * GET /api/Goods/GetSystemGoodsType
     * @param type 普通商品/自营商品
     */
    static async GetSystemGoodsType(type: string, page: number) {
        return await Service.Request( "/api/Goods/GetSystemGoodsType","GET", { type, page });
    }

    /**
     * 根据分类查询商品接口
     * GET /api/Goods/GetTypeGoodsList
     */
    static async GetTypeGoodsList(gtId: string, page: number) {
        return await Service.Request("/api/Goods/GetTypeGoodsList", "GET",{ gtId, page });
    }
	
	
	/**
	 * 拼团商品
	 * GET /api/Goods/GetTuanGoodsList
	 */
	static async GetTuanGoodsList( page: number) {
	    return await Service.Request("/api/Goods/GetTuanGoodsList", "GET",{ page });
	}
	
	
}