// var ctxPath = getContextPath(); let contentPath="/czl-web" var pagesPath = getContextPath(); <<<<<<< .mine let host=window.location.host; let ctxPath; console.log(window.location.protocol) ctxPath=window.location.protocol+"//"+host+"/czl"; //±¾µØ ctxPath = window.location.protocol+"//192.168.0.14:42880/czl"; // function getContextPath() { // var pathName = document.location.pathname; // var index = pathName.substr(1).indexOf("/"); // var result = pathName.substr(0, index + 1); // return result; // } ======= function getContextPath() { var pathName = document.location.pathname; var index = pathName.substr(1).indexOf("/"); var result = pathName.substr(0, index + 1); return result; } >>>>>>> .theirs