import request from '@/utils/request'

// 手机号绑定
export function phoneBind(params) {
  return request({
    url: '/customer/resetMobile',
    method: 'get',
    params
  })
}

// 密码修改
export function password(params) {
  return request({
    url: '/customer/resetPassword',
    method: 'get',
    params
  })
}

// 邮箱绑定
export function emailBind(params) {
  return request({
    url: '/customer/restMail',
    method: 'get',
    params
  })
}

// 重置密码
export function resetPassword(params) {
  return request({
    url: '/customer/resetPassword',
    method: 'get',
    params
  })
}

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