import request from "@/utils/request";
export function mail(data) {
  return request({
    url: "/oa/mail",
    method: "post",
    data: data,
  });
}
export function drafts(data) {
  return request({
    url: "/oa/mail/drafts",
    method: "post",
    data: data,
  });
}
//转发
export function forward(data) {
  return request({
    url: "/oa/mail/forward/mail",
    method: "post",
    data: data,
  });
}
//编辑
export function editorMail(data) {
  return request({
    url: "/oa/mail/",
    method: "PUT",
    data: data,
  });
}
//获取所有联系人组
export function groupList(query) {
  return request({
    url: "/oa/group/list",
    method: "get",
    params: query,
  });
}
// 查询常用联系人详细
export function getPeoplegroup(id) {
  return request({
    url: "/oa/group/selectUserByGroup/" + id,
    method: "get",
  });
}
//添加常用联系人组
export function addGroup(data) {
  return request({
    url: "/oa/group",
    method: "post",
    data: data,
  });
}
//添加常用联系人
export function addContacts(data) {
  return request({
    url: "/oa/contacts",
    method: "post",
    data: data,
  });
}

// 删除常用联系人
export function delPeople(data) {
  return request({
    url: "/oa/contacts",
    method: "delete",
    data,
  });
}
