//获取基础路径,如http://localhost:8080/xxx
window._serverPath = function() {
if (!window._baseUrl) {
var local = window.location;
var contextPath = local.pathname.split("/")[1];
window._baseUrl = local.protocol + "//" + local.host + "/" + contextPath + "/";
}
return window._baseUrl;
}();