businessutil.js 687 B

123456789101112131415161718192021
  1. function getBaseRootPath() {
  2. var strFullPath = window.document.location.href;
  3. var strPath = window.document.location.pathname;
  4. var pos = strFullPath.indexOf(strPath);
  5. var prePath = strFullPath.substring(0, pos);
  6. var postPath = strPath.substring(0, strPath.substr(1).indexOf('/') + 1);
  7. console.log("strFullPath:"+strFullPath)
  8. console.log("strPath:"+strPath)
  9. console.log("pos:"+pos)
  10. console.log("prePath:"+prePath)
  11. console.log("postPath:"+postPath)
  12. if(postPath != "/bigdata" && postPath != 'visualization'){
  13. return (prePath + postPath)
  14. }else{
  15. return prePath
  16. }
  17. // return prePath
  18. //return (prePath + postPath);
  19. }