import request from '@/utils/request'

// 手机号绑定
export function phoneBind(data) {
  return request({
    url: '/user/phoneBind',
    method: 'post',
    data
  })
}

// 密码修改
export function password(data) {
  return request({
    url: '/user/password',
    method: 'put',
    data
  })
}

// 邮箱绑定
export function emailBind(data) {
  return request({
    url: '/user/emailBind',
    method: 'post',
    data
  })
}

// 重置密码
export function resetPassword(data) {
  return request({
    url: '/user/reSetPassword',
    method: 'post',
    data
  })
}

// 修改用户名称
export function editUserName(data) {
  return request({
    url: `/user/username/${data.username}`,
    method: 'put'
  })
}
