config.js 2.0 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556
  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. var task_server_url = getTaskaddr();
  8. function getCurrentaddr() {
  9. return "http://" + window.location.host + "/"
  10. }
  11. function getserveraddr() {
  12. if (base_ui_url.indexOf("file_yanhai.jsxt.jsjtyxt.com") != -1) {
  13. return "http://server_yanhai.jsxt.jsjtyxt.com/";
  14. } else if (base_ui_url.indexOf("file_release_yanhai") != -1) {
  15. return "http://server_release_yanhai.jsxt.jsjtyxt.com/";
  16. } else if (base_ui_url.indexOf("localhost") != -1) {
  17. return "http://server_yanhai.jsxt.jsjtyxt.com/";
  18. // return "http://localhost:8089/"
  19. } else if (base_ui_url.indexOf("192.168.8.236") != -1) {
  20. return "http://192.168.8.236:8089/"
  21. } else {
  22. return "http://10.112.0.199:8089/"
  23. }
  24. }
  25. function getImageaddr() {
  26. if (base_ui_url.indexOf("file_yanhai.jsxt.jsjtyxt.com") != -1) {
  27. return "http://file_release_yanhai.jsxt.jsjtyxt.com/";
  28. } else if (base_ui_url.indexOf("file_release_yanhai") != -1) {
  29. return "http://file_release_yanhai.jsxt.jsjtyxt.com/";
  30. } else if (base_ui_url.indexOf("localhost") != -1) {
  31. // return "http://10.112.0.199:7000/"
  32. return "http://file_release_yanhai.jsxt.jsjtyxt.com/";
  33. } else if (base_ui_url.indexOf("192.168.8.236") != -1) {
  34. return "http://192.168.8.236/"
  35. } else {
  36. return "http://10.112.0.199/"
  37. }
  38. }
  39. function getTaskaddr() {
  40. if (base_ui_url.indexOf("jsjtyxt.com") != -1) {
  41. return "http://task_yanhai.jsxt.jsjtyxt.com/";
  42. } else if (base_ui_url.indexOf("localhost") != -1) {
  43. // return "http://10.112.0.199:8099/"
  44. return "http://localhost:8099/"
  45. } else if (base_ui_url.indexOf("192.168.8.236") != -1) {
  46. return "http://192.168.8.236:8099/"
  47. } else {
  48. return "http://10.112.0.199:8099/"
  49. }
  50. }