import request from "@/utils/request";

// 查询激活码列表
export function listCode(query) {
  return request({
    url: "/vip/code/list",
    method: "get",
    params: query
  });
}

// 新增激活码
export function addNewCode() {
  return request({
    url: "/vip/code",
    method: "post"
  });
}

// 查询激活码详细
export function getCode(id) {
  return request({
    url: "/vip/code/" + id,
    method: "get"
  });
}

// 新增激活码
export function addCode(data) {
  return request({
    url: "/vip/code",
    method: "post",
    data: data
  });
}

// 修改激活码
export function updateCode(data) {
  return request({
    url: "/vip/code",
    method: "put",
    data: data
  });
}

// 删除激活码
export function delCode(id) {
  return request({
    url: "/vip/code/" + id,
    method: "delete"
  });
}

// 导出激活码
export function exportCode(query) {
  return request({
    url: "/vip/code/export",
    method: "get",
    params: query
  });
}

// 查询代理商列表
export function getAgentList(query) {
  return request({
    url: "/vip/code/agentList",
    method: "get",
    params: query
  });
}

