import request from '@/utils/request'

export function sendVerificationCode(email) {
  return request({
    url: `/User/sendVerificationCode/${email}`,
    method: 'get'
  })
}

export function setNewEmail(newEmail, verificationCode) {
  return request({
    url: `/User/setNewEmail/${newEmail}/${verificationCode}`,
    method: 'put'
  })
}

export function setNewPhone(newPhone) {
  return request({
    url: `/User/setNewPhone/${newPhone}`,
    method: 'put'
  })
}

export function setNewUserName(newPhone) {
  return request({
    url: `/User/setNewUserName/${newPhone}`,
    method: 'put'
  })
}
export function SetNewCheckCode(newCheckCode) {
  return request({
    url: `/User/SetNewCheckCode/${newCheckCode}`,
    method: 'put'
  })
}
