import http from '@/api/http';
/**
 * 通知分类列表
 */
export function noticesTypesList(params: object) {
  return http.get('/system/notices/types/list', params);
}
/**
 * 通知管理的公告列表
 */
export function noticesList(params: object) {
  return http.get('/system/notices/notice/list', params);
}
/**
 * 添加公告分类
 */
export function noticesTypesAdd(params: object) {
  return http.post('/system/notices/types/add', params);
}
/**
 * 删除公告分类
 */
export function noticesTypesDel(id: number | string, params: object) {
  return http.post(`/system/notices/types/del/${id}`, params);
}
/**
 * 添加公告
 */
export function noticesAdd(params: object) {
  return http.post('/system/notices/notice/add', params);
}

/**
 * 保存编辑公告
 */
export function noticesEdit(id: number | string, params: object) {
  return http.post(`/system/notices/notice/edit/${id}`, params);
}

/**
 * 删除公告
 */
export function noticesdel(id: number | string, params: object) {
  return http.post(`/system/notices/notice/del/${id}`, params);
}
/**
 * 获取公告通知对象选择项
 */
export function noticesObjOption(params: object) {
  return http.post(`/system/notices/notice/obj_option`, params);
}
/**
 * 我的公告列表
 */
export function noticeListMine(params: object) {
  return http.get(`/system/notices/notice/mine`, params);
}
/**
 * 用户查看详情
 */
export function noticeDetail(id: string | number, params?: object) {
  return http.get(`/system/notices/notice/detail/${id}`, params);
}
/**
 * 用户设置已读
 */
export function noticeRead(id: string | number, params?: object) {
  return http.get(`/system/notices/notice/read/${id}`, params);
}
/**
 * 用户删除
 */
export function noticeUserDel(id: string | number, params?: object) {
  return http.get(`/system/notices/notice/user_del/${id}`, params);
}
/**
 * 获取一条弹窗
 */
export function noticePopup(params?: object) {
  return http.get(`/system/notices/notice/popup`, params);
}
