//js 获取项目的 ip 和端口号
var curWWWPath = window.document.location.href;
var pathname = window.document.location.pathname;
var pos = curWWWPath.indexOf(pathname);
var localhostPath = curWWWPath.substring( 0, pos );
console.log( localhostPath );