import request from '@/utils/request'

export function login(data) {
  return request({
    url: '/uer/login',
    method: 'post',
    data
  })
}

export function getInfo(token) {
  return request({
    url: '/uer/info',
    method: 'get',
    params: { token }
  })
}

// 获取密钥
export function getKeyInfo(query) {
  return request({
    url: '/key/info',
    method: 'get',
    params: query
  })
}

export function addInfo(data) {
  return request({
    url: '/uer/info/add',
    method: 'post',
    data
  })
}

export function queryInfo(query) {
  return request({
    url: '/uer/info/query',
    method: 'get',
    params: query
  })
}

export function logout() {
  return request({
    url: '/uer/logout',
    method: 'post'
  })
}
