config.js 1.0 KB

12345678910111213141516171819202122232425262728293031323334353637
  1. // var base_ui_url = "http://10.112.0.236:8088/";
  2. // var base_server_url = "http://10.112.0.236:8089/";
  3. var ISCLIENT = false;
  4. var base_ui_url = getCurrentaddr();
  5. var base_server_url = getserveraddr();
  6. var base_image_server_url = getImageaddr();
  7. function getCurrentaddr(){
  8. return "http://"+window.location.host+"/"
  9. }
  10. function getserveraddr(){
  11. if(base_ui_url.indexOf("topm.win")!=-1){
  12. return "http://server_yanhai.git.topm.win:8080/";
  13. }
  14. else if(base_ui_url.indexOf("localhost")!=-1){
  15. return "http://localhost:8089/"
  16. }
  17. else if(base_ui_url.indexOf("192.168.8.236")!=-1){
  18. return "http://192.168.8.236:8089/"
  19. }
  20. else{
  21. return "http://10.112.0.199:8089/"
  22. }
  23. }
  24. function getImageaddr(){
  25. if(base_ui_url.indexOf("topm.win")!=-1){
  26. return "http://file_yanhai.git.topm.win:8080/";
  27. }
  28. else if(base_ui_url.indexOf("localhost")!=-1){
  29. return "http://file_yanhai.git.topm.win:8080/"
  30. // return "http://localhost:9080/"
  31. }else{
  32. return "http://10.112.0.199/"
  33. }
  34. }