import request from "./../utils/request.js";
/**
 * 消息相关接口
 * 
*/


/**
 * 获取列表
*/
export function getMessages(page, limit = 20) {
  return request.get("user/messages", {page: page, limit: limit});
}

/**
 * 已读/未读 标记 0 未读 1已读
*/
export function readMessage(ids, state) {
  return request.post("user/messages", {ids: ids, read: state});
}

/**
 * 删除
*/
export function delMessage(ids) {
  return request.delete("user/messages", {ids: ids});
}