import request from '@/utils/request'

export function fetchFindProductList(params) {
  return request({
    url: '/svip/member/findProductList',
    method: 'get',
    params
  })
}
// 超级会员专属优惠券列表
export function fetchCouponList(params) {
  return request({
    url: '/svip/member/couponList',
    method: 'get',
    params
  })
}
// 回显编辑超级会员优惠券
export function svipCoupon(params) {
  return request({
    url: '/svip/member/svipCoupon',
    method: 'get',
    params
  })
}
// 保存超级会员优惠券
export function saveVipCoupon(data) {
  return request({
    url: '/svip/member/saveVipCoupon',
    method: 'post',
    data: data
  })
}
// 关闭超级会员专属优惠券
export function fetchCloseCoupon(id) {
  return request({
    url: '/svip/member/closeCoupon/' + id,
    method: 'post'
  })
}
// 开启超级会员专属优惠券
export function fetchOpenCoupon(id) {
  return request({
    url: '/svip/member/openCoupon/' + id,
    method: 'post'
  })
}
// 删除超级会员专属优惠券
export function fetchDeleteCoupon(id) {
  return request({
    url: '/svip/member/deleteCoupon/' + id,
    method: 'post'
  })
}
// 删除超级会员具体优惠券
export function delCoupon(id) {
  return request({
    url: '/svip/member/delCoupon/' + id,
    method: 'post'
  })
}
// 获取供应商列表
export function fetchFindShop(params) {
  return request({
    url: '/svip/member/findShopList',
    method: 'get',
    params
  })
}
// 获取商品信息列表
export function fetchProductList(params) {
  return request({
    url: '/svip/member/findProductDialogList',
    method: 'get',
    params
  })
}
export function fetchMemberList(params) {
  return request({
    url: '/svip/member/memberList',
    method: 'get',
    params
  })
}
export function fetchClubList(params) {
  return request({
    url: '/svip/member/findClubList',
    method: 'get',
    params
  })
}
export function saveSvip(params) {
  return request({
    url: '/svip/member/saveSvip',
    method: 'post',
    params
  })
}
export function findHistory(params) {
  return request({
    url: '/svip/member/findHistory',
    method: 'get',
    params
  })
}
export function fetchFindPackage() {
  return request({
    url: '/svip/member/findPackage',
    method: 'get'
  })
}
export function updatePrice(params) {
  return request({
    url: '/svip/member/updatePrice',
    method: 'post',
    params
  })
}
export function updateSort(params) {
  return request({
    url: '/svip/member/updateSort',
    method: 'get',
    params
  })
}
export function saveSvipProduct(data) {
  return request({
    url: '/svip/member/saveSvipProduct',
    method: 'post',
    data: data
  })
}
export function delSvipProduct(id) {
  return request({
    url: '/svip/member/delSvipProduct/' + id,
    method: 'post'
  })
}
export function editSvipProduct(id) {
  return request({
    url: '/svip/member/editSvipProduct/' + id,
    method: 'post'
  })
}
export function getAdsImage() {
  return request({
    url: '/svip/member/getAdsImage',
    method: 'get'
  })
}
export function saveAdsImage(data) {
  return request({
    url: '/svip/member/saveAdsImage',
    method: 'post',
    data: data
  })
}
