import { http } from '../request/request'

/**
 * 获取督学师信息
 * @param data 请求参数
 */
export const getUserInfo = async (data = {}): Promise<any> => {
  return await http.post<any>('/phone/inspectorTeacher/myInfo', data)
}
/**
 * 查询用户角色
 * @param params 请求参数
 */
export const queryUserRoles = async (params = {}): Promise<any> => {
  return await http.get<any>('/sysUser/getAdminTypeByPhone', params)
}
/**
 * 切换用户角色
 */
export const switchRole = async (adminType: number): Promise<any> => {
  return await http.get<any>('/sysUser/changeAdminType', {
    adminType,
  })
}
