import { axios } from '@/utils/request'

// 获取列表数据
export const giftCardQuery = params => {
  const url = `giftCard/query/${params.pageNo}/${params.pageSize}`
  delete params.pageNo
  delete params.pageSize
  return axios({
    url: url,
    data: params,
    method: 'post'
  })
}
// 新增礼品卡
export const giftCardAdd = params => {
  return axios({
    url: `giftCard/batchAdd`,
    data: params,
    method: 'post'
  })
}
// 编辑礼品卡
export const giftCardEdit = params => {
  return axios({
    url: `giftCard/editGiftCardItem`,
    data: params,
    method: 'post'
  })
}
// 礼品卡详情
export const giftCardDetail = params => {
  return axios({
    url: `giftCard/detail/${params.id}`,
    data: {},
    method: 'get'
  })
}
// 删除礼品卡
export const giftCardDel = (params) => {
  return axios({
    url: `giftCard/delGiftCardItemById/${params.id}`,
    data: {},
    method: 'get'
  })
}
