import request from "@/utils/request";

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

//登出
export async function fakeAccountLoginOut(params) {
  return request(`/wmspro/logout`, {
    method: "POST",
    body: params,
  });
}

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


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

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

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

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

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