import request from '@/utils/request'

/**
 * 礼品小程序分页查询
 * @param {查询条件} data
 */
export function listGiftConfig(query) {
  return request({
    url: 'business/GiftConfig/list',
    method: 'get',
    params: query,
  })
}

/**
 * 新增礼品小程序
 * @param data
 */
export function addGiftConfig(data) {
  return request({
    url: 'business/GiftConfig',
    method: 'post',
    data: data,
  })
}
/**
 * 修改礼品小程序
 * @param data
 */
export function updateGiftConfig(data) {
  return request({
    url: 'business/GiftConfig',
    method: 'PUT',
    data: data,
  })
}
/**
 * 获取礼品小程序详情
 * @param {Id}
 */
export function getGiftConfig(id) {
  return request({
    url: 'business/GiftConfig/' + id,
    method: 'get'
  })
}

/**
 * 删除礼品小程序
 * @param {主键} pid
 */
export function delGiftConfig(pid) {
  return request({
    url: 'business/GiftConfig/delete/' + pid,
    method: 'POST'
  })
}
