import request from '@/utils/request'

export function fetchList(query) {
  return request({
    url: '/api/user/list',
    method: 'get',
    params: query
  })
}


export function OffLineOrOnLine(data) {
  return request({
    url: '/api/user/update_or_create',
    method: 'post',
    data
  })
}


export function UserDetail(id) {
  return request({
    url: '/api/user/get',
    method: 'get',
    params: { id }
  })
}

export function fetchGroupUser(query) {
  return request({
    url: '/api/user/group/list',
    method: 'get',
    params: query
  })
}

export function userCreate(data) {
  return request({
    url: '/api/user/create',
    method: 'post',
    data,
  })
}
