config.js 2.8 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475
  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_release_yanhai.jsxt.jsjtyxt.com/"
  18. return "http://localhost:8089/"
  19. } else if (base_ui_url.indexOf("192.168.31.233") != -1) {
  20. return "http://192.168.31.233:8089/"
  21. } else if (base_ui_url.indexOf("192.168.8.236") != -1) {
  22. return "http://192.168.8.236:8089/"
  23. } else {
  24. return "http://10.112.0.199:8089/"
  25. }
  26. }
  27. function getExcelServeraddr() {
  28. if (base_ui_url.indexOf("file_yanhai.jsxt.jsjtyxt.com") != -1) {
  29. return "http://server_yanhai.jsxt.jsjtyxt.com/";
  30. } else if (base_ui_url.indexOf("file_release_yanhai") != -1) {
  31. return "http://server_release_yanhai.jsxt.jsjtyxt.com/";
  32. } else if (base_ui_url.indexOf("localhost") != -1) {
  33. // return "http://server_release_yanhai.jsxt.jsjtyxt.com/"
  34. return "http://localhost:9000/"
  35. } else if (base_ui_url.indexOf("192.168.31.233") != -1) {
  36. return "http://192.168.31.233:9000/"
  37. } else if (base_ui_url.indexOf("192.168.8.236") != -1) {
  38. return "http://192.168.8.236:9000/"
  39. } else {
  40. return "http://10.112.0.199:9000s/"
  41. }
  42. }
  43. function getImageaddr() {
  44. if (base_ui_url.indexOf("file_yanhai.jsxt.jsjtyxt.com") != -1) {
  45. return "http://file_release_yanhai.jsxt.jsjtyxt.com/";
  46. } else if (base_ui_url.indexOf("file_release_yanhai") != -1) {
  47. return "http://file_release_yanhai.jsxt.jsjtyxt.com/";
  48. } else if (base_ui_url.indexOf("localhost") != -1) {
  49. // return "http://10.112.0.199:7000/"
  50. return "http://localhost:8081/";
  51. } else if (base_ui_url.indexOf("192.168.8.236") != -1) {
  52. return "http://192.168.8.236/"
  53. } else {
  54. return "http://10.112.0.199/"
  55. }
  56. }
  57. function getTaskaddr() {
  58. if (base_ui_url.indexOf("jsjtyxt.com") != -1) {
  59. return "http://task_yanhai.jsxt.jsjtyxt.com/";
  60. } else if (base_ui_url.indexOf("localhost") != -1) {
  61. // return "http://10.112.0.199:8099/"
  62. return "http://localhost:8099/"
  63. } else if (base_ui_url.indexOf("192.168.8.236") != -1) {
  64. return "http://192.168.8.236:8099/"
  65. } else {
  66. return "http://10.112.0.199:8099/"
  67. }
  68. }