import request from '@/utils/request';

/**
 * 用户登录
 * @param prams 登录参数
 */
export const userLogin = (params: any) => {
  return request.post('/edu-app/userlogin', {
    requestType: 'form',
    data: params
  });
};

/**
 * 获取用户信息
 * returns user
 */
export const getUserInfo = () => {
  return request.get('/edu-app/user/getUserInfo');
};

/**
 * 老师端修改用户信息
 */
export const api_teacherUpdate = (body: any) => {
  return request.post('/edu-app/teacher/update', { data: body });
};

/**
 * 获取声部列表
 * returns subjects
 */
export const getSubjectList = (params: any) => {
  return request.post('/edu-app/subject/page', {
    data: params
  });
};

/**
 * 获取曲谱分类
 * @returns musicSheetCategories
 */
export const getCategories = (params: any) => {
  return request.post('/edu-app/musicSheetCategories/page', {
    data: params
  });
};
