import request from '@/utils/request'

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

export function getInfo() {
  return request({
    url: '/api/roles',
    method: 'get'
  })
}

export function logout(user_sn) {
  return request({
    url: '/api/loginOut',
    method: 'post',
    data: { user_sn: user_sn }
  })
}
export function uploadAvatar(data) {
  return request({
    url: '/api/users/uploadAvatar',
    method: 'post',
    data
  })
}
