import request from "@/utils/request";

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

//登出
export async function fakeAccountLoginOut(params) {
  return request(`/srwms/ngic-auth/sysAccount/logout`, {
    method: "POST",
    body: params,
  });
}

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


//个人信息
export async function queryCurrentUser(params) {
  return request("/srwms/ngic-auth/sysUser/query", {
    method: "POST",
    data: params,
  });
}

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

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

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