"use strict";

var _interopRequireDefault = require("@babel/runtime/helpers/interopRequireDefault");

Object.defineProperty(exports, "__esModule", {
  value: !0
}), exports.getPermissionsMenus = exports.getPermissionsCompany = exports.login = exports.getSystemAllMenu = exports.getCurrentUser = void 0;

var _urlFormat = _interopRequireDefault(require("amos-processor/lib/utils/urlFormat")), _request = require("../utils/request"), _urlConsts = require("./../consts/urlConsts"), getCurrentUser = function() {
  return (0, _request.commonGet)(_urlConsts.secExtUrl.currentUserUrl);
};

exports.getCurrentUser = getCurrentUser;

var getSystemAllMenu = function(e, r) {
  return (0, _request.commonGet)((0, _urlFormat.default)(_urlConsts.secExtUrl.systemMenusUrl, {
    code: e,
    userId: r
  }));
};

exports.getSystemAllMenu = getSystemAllMenu;

var login = function(e, r) {
  return (0, _request.commonPost)((0, _urlFormat.default)(_urlConsts.secExtUrl.loginUrl), {
    code: e,
    userId: r
  });
};

exports.login = login;

var getPermissionsCompany = function() {
  return (0, _request.commonGet)((0, _urlFormat.default)(_urlConsts.secExtUrl.systemMenusUrl));
};

exports.getPermissionsCompany = getPermissionsCompany;

var getPermissionsMenus = function(e) {
  return (0, _request.commonGet)((0, _urlFormat.default)(_urlConsts.secExtUrl.permissionsMenusUrl, {
    roleSeq: e
  }));
};

exports.getPermissionsMenus = getPermissionsMenus;