import request from '@/utils/request'

/**
 * 登录
 * @param {*} data 
 * @returns 
 */
export const signIn = (data) => request('/login', { data, method: 'post' })

/**
 * 授权手机
 * @param {*} data 
 * @returns 
 */
export const authPhone = (data) => request('/auth-phone', { data, method: 'put' })

/**
 * 授权头像
 * @param {*} data 
 * @returns 
 */
export const authAvatar = (data) => request('/auth-user', { data, method: 'put' })

 /**
 * 切换角色
 * @param {*} data 
 * @returns 
 */
  export const toggleRoul = (targetType) => request(`/person-role/${targetType}`,{ method: 'post'})