import { http } from "@/utils/http";

type addDept = {
  code: number;
  msg: string;
  data: boolean;
};
type addDeptList = {
  code: number;
  msg: string;
  data: recordsList;
};
type recordsList = {
  records: Array<any>;
  totalPage: number;
};
// 新增用户组
export const postAddUserGroup = data => {
  return http.request<addDept>("post", "/userGroup/addUserGroup", { data });
};
// 分页用户组
export const postPageGroup = data => {
  return http.request<addDeptList>("post", "/userGroup/pageGroup", { data });
};
// 根据编码删除
export const postDelUserGroup = data => {
  return http.request<addDept>("post", "/userGroup/removeGroupByCode", {
    data
  });
};
// 根据编码更新
export const postUpdateGroupByCode = data => {
  return http.request<addDept>("post", "/userGroup/updateGroupByCode", {
    data
  });
};
