import fetch from "@/utils/fetch";

export default {
  // ----------------------------用户管理--------------------
  getUserList(data) {
    // 获取用户列表
    return fetch({
      url: "/User/getUserList",
      method: "POST",
      data,
    });
  },

  addOrUpdateUser(data) {
    // 增加或者修改用户
    return fetch({
      url: "/User/addOrUpdateUser",
      method: "POST",
      data,
    });
  },

  getUserById(params) {
    // 根据id获取用户
    return fetch({
      url: "/User/getUserById",
      method: "GET",
      params,
    });
  },

  addOrUpdateExpert(data) {
    // 新增或者修改一条专家信息
    return fetch({
      url: "/Expert/addOrUpdateExpert",
      method: "POST",
      data,
    });
  },

  getExpertList(data) {
    // 获取专家信息列表
    return fetch({
      url: "/Expert/getExpertList",
      method: "POST",
      data,
    });
  },

  getExpertById(params) {
    // 查询一条专家信息
    return fetch({
      url: "/Expert/getExpertById",
      method: "GET",
      params,
    });
  },

  deleteExpertById(params) {
    // 删除一条专家信息
    return fetch({
      url: "/Expert/deleteExpertById",
      method: "GET",
      params,
    });
  },
};
