import { http } from '@/utils/http/axios'

/**
 * 获系统消息
 * @returns
 */
export async function getMessageList(params) {
  const res = await http.request({
    url: `/ocr/msg/systemPage`,
    method: 'get',
    params,
  })

  return res
}

/**
 * 消息详情
 * @returns
 */
export async function msgOne(params) {
  const res = await http.request({
    url: `/ocr/msg/msgOne`,
    method: 'get',
    params,
  })

  return res
}

/**
 * 消息未读单读
 * @returns
 */
export async function readMsg(params) {
  const res = await http.request({
    url: `/ocr/msg/eliminateUnreadone`,
    method: 'get',
    params,
  })

  return res
}

/**
 * 消息未读全读
 * @returns
 */
export async function readAllMsg(params) {
  const res = await http.request({
    url: `/ocr/msg/eliminateUnreadfull`,
    method: 'get',
    params,
  })

  return res
}

/**
 * 未读消息总数
 * @returns
 */
export async function msgPolling() {
  const res = await http.request({
    url: `/ocr/msg/msgPolling`,
    method: 'get',
  })

  return res
}
