import request from "@/utils/request";
import { Account_BaseUrl } from "@/api/config";
const baseURL = Account_BaseUrl + "/admin/sysUser";
const API = {
  getList(params: any) {
    return request({
      url: `${baseURL}`,
      method: "get",
      params
    });
  },
  edit(data: any) {
    return request({
      url: `${baseURL}`,
      method: "put",
      data: data,
    });
  },
  delete(data: any) {
    return request({
      url: `${baseURL}?id=${data}`,
      method: "delete",
    });
  },
  add(data: any) {
    return request({
      url: `${baseURL}`,
      method: "post",
      data: data,
    });
  },
  detail(params: any) {
    return request({
      url: `${baseURL}/detail`,
      method: "get",
      params
    });
  },

  download(params: any) {
    return request({
      url: `${baseURL}/download`,
      method: "get",
      params,
      responseType: "blob",
    });
  },
  // 重置密码
  pwd(data: any) {
    return request({
      url: `${baseURL}/pwd`,
      method: "put",
      data
    });
  },
}
export default API;
