import request from '@/utils/request'

// api地址
const api = {
  list: 'sharp.goods/list',
  detail: 'sharp.goods/detail',
  poster: 'sharp.goods/poster'
}

// 秒杀活动商品列表
export const list = (activeTimeId, param, option) => {
  return request.get(api.list, { activeTimeId, ...param }, option)
}

// 获取活动商品详情
export const detail = (activeTimeId, sharpGoodsId, param) => {
  return request.get(api.detail, { activeTimeId, sharpGoodsId, ...param })
}

// 生成商品海报
export const poster = param => {
  return request.get(api.poster, param)
}
