//获取项目名称function getWebName(){ var pathName = window.location.pathname.substring(1); var webName = pathName == ''? '' : "/"+pathName.substring(0, pathName.indexOf('/')); if(webName=='/pages'||webName=='/'){ webName = ''; } return webName;}