import httpRequest from '@/utils/axios'

// 登出
export function logout() {
  return httpRequest.get('/api/passport/logout')
}
// 获取用户信息
export function getUser() {
  return httpRequest.get('/api/passport/account/get-user-info')
}
// 发送验证码
export function sendCode(data) {
  return httpRequest({
    url: '/api/usercenter/user/send-code',
    method: 'post',
    headers: { 'Content-Type': 'application/x-www-form-urlencoded' },
    data
  })
}
// 修改密码
export function updatePassword(data) {
  return httpRequest({
    url: '/api/usercenter/user/update-pwd',
    method: 'post',
    headers: { 'Content-Type': 'application/x-www-form-urlencoded' },
    data
  })
}
// 修改用户信息
export function updateUserInfo(data) {
  return httpRequest({
    url: '/api/usercenter/user/update-user',
    method: 'post',
    headers: { 'Content-Type': 'application/x-www-form-urlencoded' },
    data
  })
}