import {
	request
} from '@/utils/request.js'
 
 
// 发送验证码 /api/sms/send
export const getSend = (mobile, event) => request({url: '/api/sms/send',method: 'post',data: {mobile, event}})

// 手机验证码登录 /api/common/mobilelogin
export const getCodeLogin = (mobile, captcha) => request({url: '/api/common/mobilelogin',method: 'post',data: {mobile, captcha}})


// 搜索 /api/index/search
export const getSearch = (obj) => request({url: '/api/index/search',method: 'post',data: obj})

// 热门配件搜索 /api/upgrade/HotGoodsSearch
export const getHot = () => request({url: '/api/upgrade/HotGoodsSearch',method: 'post',data: {}})

// 个人信息 /api/user/usercenter
export const getUser = () => request({url: '/api/user/usercenter',method: 'post',data: {}})

// 修改头像 /api/user/upavatar
export const getAvatar = (avatar) => request({url: '/api/user/upavatar',method: 'post',data: {avatar}})

 // 修改昵称 /api/user/upnickname
export const getnickName = (nickname) => request({url: '/api/user/upnickname',method: 'post',data: {nickname}})
 
// 修改手机号 /api/user/changemobile
export const getChange = (mobile,captcha) => request({url: '/api/user/changemobile',method: 'post',data: {mobile,captcha}})

// 绑定手机号 /api/user/phone
// export const getPhone = (phone,captcha) => request({url: '/api/user/phone',method: 'post',data: {phone,captcha}})