function getContextPath() {
    var pathName = document.location.pathname;
    var index = pathName.substr(1).indexOf("/");
    var result = pathName.substr(0, index + 1);
    return result;
}

//当前登录人
function currentUser () {
    var currentUser = {};
    $.ajax({
        url: authServer + "/current-user",
        type: "get",
        dataType: "json",
        contentType: "application/json;charset=UTF-8",
        async: false,
        success: function (data) {
            currentUser = data.data;
        }
    });
    return currentUser;
}

//文件服务
var fileStoreServer = getContextPath()+ "/api/file";

//登录
var authServer = getContextPath()+ "/auth";

//工作流服务
var processEngineServer = getContextPath() + '/process-engine';

//当前登录人account接口地址
var currentLoginUser = getContextPath() + '/auth/current-user';
//account服务
var accountServer = '/pms/account';
//supplier服务
var supplierServer = '/pms/supplier';
//成本类项目服务
var projectCostServer = '/pms/projectcost';
//投资类项目服务
var projectInvestServer = '/pms/projectinvest';
//合同服务
var contractServer = '/pms/contract';
//报表服务
var reportStatisticsServer = '/pms/report-statistics';
//通信工程成本类服务
var engineeringcostServer = '/pms/engineeringcost';
