// 登陆相关接口
import request from '@/utils/index'
// 登陆接口
export const login = (params:any) => request.post('/v1/auth/login', params)
// // 获取role条数据
// export const getRole = (id) => request.basic.get(`/api/v1/roles/${id}`)
// // 添加role
// export const createRole = (params) => request.basic.post('/api/v1/roles', params)
// // 更新role
// export const updateRole = (id, params) => request.basic.put(`/api/v1/roles/${id}`, params)
// // 删除role
// export const delRole = (id) => request.basic.delete(`/api/v1/roles/${id}`)
// 修改密码
export const updatePassword = (newPassword:any) => request.put('/v1/auth/update_password',newPassword)
// 获取用户信息
export const fetchUserInfo = () => request.get('/v1/auth/info')
// 修改手机号
export const updatePhoneNumber = (params:any) => request.put('/v1/auth/update_phone', params)
//注册
export const register = (params:any) => request.post('/v1/auth/register', params)
//忘记密码
export const forgetPassword = (params:any) => request.post('/v1/auth/forgot_password', params)