import request from "@/utils/request";
//收件箱
export function inboxList(query) {
  // let f = new FormData();
  // Object.keys(data).forEach((key) => {
  //   f.append(key, data[key]);
  // });
  return request({
    url: "/oa/mail/inbox",
    method: "get",
    params: query,
  });
}

//剩余未读
export function unread() {
  return request({
    url: "/oa/mail/count/unread",
    method: "get",
  });
}
//设为已读
export function setAsRead() {
  return request({
    url: "/oa/mail/setAsRead",
    method: "put",
  });
}
//删除收件箱邮件
export function deleteBoxMail(id) {
  return request({
    url: "/oa/mail/deleteBoxMail/" + id,
    method: "delete",
  });
}
//未读列表
export function unreadList() {
  return request({
    url: "/oa/mail/inbox/unread",
    method: "get",
  });
}
//邮件详情
export function detail(id) {
  return request({
    url: "/oa/mail/detail/" + id,
    method: "get",
  });
}
