import request from '@/utils/request'

// 查询推广码列表
export function listShareCode(query) {
  return request({
    url: '/ss/shareCode/list',
    method: 'get',
    params: query
  })
}

// 查询推广码详细
export function getShareCode(codeId) {
  return request({
    url: '/ss/shareCode/' + codeId,
    method: 'get'
  })
}

// 新增推广码
export function addShareCode(data) {
  return request({
    url: '/ss/shareCode',
    method: 'post',
    data: data
  })
}

// 修改推广码
export function updateShareCode(data) {
  return request({
    url: '/ss/shareCode',
    method: 'put',
    data: data
  })
}

// 删除推广码
export function delShareCode(codeId) {
  return request({
    url: '/ss/shareCode/' + codeId,
    method: 'delete'
  })
}
