import { http } from '@/utils/http'

const pre = import.meta.env.VITE_SERVER_BASEURL_PREFIX
/**
 * 获取商品列表
 * @returns data.list[]
 */
export function getList(data: any) {
  return http.get<any>(`${pre}/app/combination/app/list`, data)
}
/**
 * 获取商品排名列表
 * @returns data.list[]
 */
export function getRankList(data: any) {
  return http.get<any>(`${pre}/app/combination/rank`, data)
}

/**
 * 获取商品分类
 * @returns data.list[]
 */
export function categoryList(data: any) {
  return http.post<any>(`${pre}/app/category/list`, data)
}

/**
 * 获取商品详情
 * @returns data.list[]
 */
export function getDetail(data: any) {
  return http.get<any>(`${pre}/app/product/detail`, data)
}
/**
 * 获取商品的拼团信息
 * @returns data.list[]
 */
export function pinkList(data: any) {
  return http.post<any>(`${pre}/app/pink/ongoing/list`, data)
}
/**
 * 滚动消息轮播
 * @returns data.list[]
 */
export function carousel(id: any) {
  return http.get<any>(`${pre}/app/product/carousel/${id}`)
}
