import request from '@/utils/request'

// 获取人员列表
export function list(query) {
  return request({
    url: '/webim/list',
    method: 'get',
    params: query
  })
}
// 获取人员列表
export function newList(query) {
  return request({
    url: '/webim/deptList',
    method: 'get',
    params: query
  })
}
// 获取人员列表
export function getMine(query) {
  return request({
    url: '/webim/mine',
    method: 'get',
    params: query
  })
}
// 设置在线状态
export function setOnlineStatus(sta) {
  return request({
    url: '/webim/setOnlineStatus/'+sta,
    method: 'get'
  })
}
// 发送消息
export function sendMsg(query) {
  return request({
    url: '/webim/sendMessage',
    method: 'post',
    params: query
  })
}
// 发送文件
export function sendFile(query) {
  return request({
    url: '/webim/sendFileMessage',
    method: 'post',
    data: query
  })
}
// 聊天记录
export function getHistory(query) {
  return request({
    url: '/webim/getHistory/'+query,
    method: 'get'
  })
}
// chatlog
export function getChatlog(query) {
  return request({
    url: '/webim/getChatLog/'+query,
    method: 'get'
  })
}
