import request from "@/utils/request";

// 查询列表
export function getList(query) {
  return request({
    url: "/question/info/list",
    method: "get",
    params: query,
  });
}

// 根据id查询列表
export function getListByIds(query) {
  return request({
    url: "/question/info/listByIds",
    method: "get",
    params: query,
  });
}

// 查询详情  /question/category/{id}
export function getDetail(id) {
  return request({
    url: `/question/info/${id}`,
    method: "get",
  });
}

// 新增  /question/category
export function add(data) {
  return request({
    url: "/question/info",
    method: "post",
    data,
  });
}

// 修改
export function update(data) {
  return request({
    url: "/question/info",
    method: "put",
    data,
  });
}

// 删除
export function del(ids) {
  return request({
    url: `/question/info/${ids}`,
    method: "delete",
  });
}

// 导出
export function exportData(data) {
  return request({
    url: `/question/info/export`,
    method: "post",
    data,
  });
}
