import request from '@/utils/request';

//登录
export function fakeAccountLogin(params) {
  return request('/ngic-auth/sysAccount/login', {
    method: 'POST',
    data: params,
  });
}

//登出
export function fakeAccountLoginOut(params) {
  return request(`/emspro/logout`, {
    method: 'POST',
    data: params,
  });
}

//登录
export function saveForRegister(params) {
  return request('/ngic-auth/sysAccountApply/saveForRegister', {
    method: 'POST',
    data: params,
  });
}

//个人信息
export function queryCurrentUser(params) {
  return request('/emspro/auth/sysUser/me', {
    method: 'POST',
    data: params,
  });
}

//获取菜单/权限/菜单/公司类型
export function getMenu(params) {
  return request(`/emspro/auth/sysPermission/queryMenu`, {
    method: 'POST',
    data: params,
  });
}

/*---------------菜单收藏-------------------*/
export function collectPerms(params) {
  return request(`/emspro/auth/sysUserPermission/collectPerm`, {
    method: 'POST',
    data: params,
  });
}

/*---------------取消菜单收藏-------------------*/
export function cancelCollectPerms(params) {
  return request(`/emspro/auth/sysUserPermission/cancelCollectPerm`, {
    method: 'POST',
    data: params,
  });
}
/*---------------菜单历史记录-------------------*/
export function mtosave(params) {
  return request(`/emspro/auth/sysUserVisitPermission/save`, {
    method: 'POST',
    data: params,
  });
}
