import request from './request.js'

// 获取验证码
export function getCaptcha(data = {}) {
  return request.get('/auth/captcha',data)
}
// 用户名登录
export function loginUsername(data = {}) {
  return request.post('/auth/login/username',data)
}
// 手机号登录
export function loginPhone(data = {}) {
  return request.post('/auth/login/phone',data)
}
// 邮箱登录
export function loginEmail(data = {}) {
  return request.post('/auth/login/email',data)
}
// 获取短信验证码
export function getSmsCode(data = {}) {
  console.log('getSmsCode1111',data)
  return request.get('/auth/sms-code',data)
}
// 获取邮箱验证码
export function getEmailCode(data = {}) {
  return request.get('/auth/email-code',data)
}
// 获取用户信息
export function getUserInfo(data = {}) {
  return request.get('/auth/user/info',data)
}
// 退出登录
export function logout(data = {}) {
  return request.post('/auth/user/logout',data)
}
// 更新用户信息
export function updateUserInfo(data = {}) {
  return request.post('/auth/user/info/update',data)
}
// 重置密码
export function resetPassword(data = {}) {
  return request.post('/auth/user/password/reset',data)
}
// 获取重置密码验证码
export function getPasswordresetCode(data = {}) {
  return request.get('/auth/user/password/reset/request',data)
}


// 发送绑定验证码
export function sendBindCode(data = {}) {
  return request.get('/auth/user/bind/code',data)
}
