import $req from '../request';

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