Ei kuvausta

huayi.load.js 3.3KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152
  1. var huayi = {};
  2. //huayi.local ={
  3. // curWwwPath: window.document.location.href,
  4. // pathName : window.document.location.pathname,
  5. // hostPath: window.document.location.href.substring(0, window.document.location.href.indexOf(window.document.location.pathname)) + window.document.location.pathname.substring(0, window.document.location.pathname.substr(1).indexOf('/') + 1)
  6. //};
  7. function GetPath() {
  8. var curWwwPath = window.document.location.href;
  9. //为了便于前端测试,便宜行事的解决方案
  10. if (curWwwPath.indexOf("127.0.0.1")>0) {
  11. var pathName = window.document.location.pathname;
  12. var pos = curWwwPath.indexOf(pathName);
  13. var localhostPaht = curWwwPath.substring(0, pos);
  14. var projectName = pathName.substring(0, pathName.substr(1).indexOf('/') + 1);
  15. var realPath = localhostPaht + projectName;
  16. return realPath;
  17. }
  18. else {
  19. return '';
  20. }
  21. }
  22. var hostPath = GetPath();
  23. document.write(" <link href=\"" + hostPath + "/css/bootstrap.min.css\" rel=\"stylesheet\" type=\"text/css\" />");
  24. document.write(" <link href=\"" + hostPath + "/css/index.css\" rel=\"stylesheet\" type=\"text/css\" />");
  25. //document.write(" <link href=\"" + hostPath + "/css/bootstrap.min14ed.css?v=3.3.6\" rel=\"stylesheet\" type=\"text/css\" />");
  26. //document.write(" <link href=\"" + hostPath + "/css/boot/bootstrap-table.css\" rel=\"stylesheet\" type=\"text/css\" />");
  27. //document.write(" <link href=\"" + hostPath + "/font/iconfont.css\" rel=\"stylesheet\" type=\"text/css\" />");
  28. //document.write(" <link href=\"" + hostPath + "/css/animate.min.css\" rel=\"stylesheet\" type=\"text/css\" />");
  29. //document.write(" <link href=\"" + hostPath + "/css/style.min862f.css?v=4.1.0\" rel=\"stylesheet\" type=\"text/css\" />");
  30. //
  31. document.write(" <script language=\"javascript\" type=\"text/javascript\" src=\"" + hostPath + "/js/jquery.min.js?v=2.1.4\"></script>");
  32. document.write(" <script language=\"javascript\" type=\"text/javascript\" src=\"" + hostPath + "/js/jquery.cookie.js\"></script>");
  33. document.write(" <script language=\"javascript\" type=\"text/javascript\" src=\"" + hostPath + "/js/echarts.min.js\"></script>");
  34. //document.write(" <script language=\"javascript\" type=\"text/javascript\" src=\"" + hostPath + "/js/highcharts.js\"></script>");
  35. //document.write(" <script language=\"javascript\" type=\"text/javascript\" src=\"" + hostPath + "/js/gray.js\"></script>");
  36. document.write(" <script language=\"javascript\" type=\"text/javascript\" src=\"" + hostPath + "/js/radialIndicator.js\"></script>");
  37. //document.write(" <script language=\"javascript\" type=\"text/javascript\" src=\"" + hostPath + "/js/bootstrap.min.js?v=3.3.6\"></script>");
  38. //document.write(" <script language=\"javascript\" type=\"text/javascript\" src=\"" + hostPath + "/js/bootstrap-table.js\"></script>");
  39. //document.write(" <script language=\"javascript\" type=\"text/javascript\" src=\"" + hostPath + "/js/bootstrap-table-zh-CN.js\"></script>");
  40. //document.write(" <script language=\"javascript\" type=\"text/javascript\" src=\"" + hostPath + "/js/layer/layer.js\"></script>");
  41. document.write(" <script language=\"javascript\" type=\"text/javascript\" src=\"" + hostPath + "/js/laydate/laydate.js\"></script>");
  42. document.write(" <script language=\"javascript\" type=\"text/javascript\" src=\"" + hostPath + "/Script/Common/huayi.http.js\"></script>");