import request from '@/utils/request'

// 手机号绑定-修改手机号
export function phoneBind(data) {
  return request({
    url: '/customerUser/modify/phoneNumber',
    method: 'post',
    data
  })
}

// 密码修改
export function password(data) {
  return request({
    url: '/customerUser/modify/pwd',
    method: 'post',
    data
  })
}

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

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

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