config.js 3.0 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970717273747576777879
  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 CLIENTVERSION = 1;
  5. var base_ui_url = getCurrentaddr();
  6. var base_server_url = getserveraddr();
  7. var base_image_server_url = getImageaddr();
  8. var task_server_url = getTaskaddr();
  9. function getCurrentaddr() {
  10. return "http://" + window.location.host + "/"
  11. }
  12. function getserveraddr() {
  13. if (base_ui_url.indexOf("file_yanhai.jsxt.jsjtyxt.com") != -1) {
  14. return "http://server_yanhai.jsxt.jsjtyxt.com:8283/";
  15. } else if (base_ui_url.indexOf("file_release_yanhai") != -1) {
  16. return "http://server_release_yanhai.jsxt.jsjtyxt.com:8283/";
  17. } else if (base_ui_url.indexOf("localhost") != -1) {
  18. // return "http://server_release_yanhai.jsxt.jsjtyxt.com/"
  19. return "http://localhost:8089/"
  20. } else if (base_ui_url.indexOf("200.200.19.126") != -1) {
  21. return "http://200.200.19.126:8089/"
  22. } else if (base_ui_url.indexOf("192.168.8.236") != -1) {
  23. return "http://192.168.8.236:8089/"
  24. } else {
  25. return "http://10.112.0.199:8089/"
  26. }
  27. }
  28. function getExcelServeraddr() {
  29. if (base_ui_url.indexOf("file_yanhai.jsxt.jsjtyxt.com") != -1) {
  30. return "http://server_fwq_yanhai.jsxt.jsjtyxt.com:8283/";
  31. } else if (base_ui_url.indexOf("file_release_yanhai") != -1) {
  32. return "http://server_fwq_release_yanhai.jsxt.jsjtyxt.com:8283/";
  33. } else if (base_ui_url.indexOf("localhost") != -1) {
  34. // return "http://server_release_yanhai.jsxt.jsjtyxt.com/"
  35. return "http://localhost:9000/"
  36. } else if (base_ui_url.indexOf("200.200.19.126") != -1) {
  37. return "http://200.200.19.126:9000/"
  38. } else if (base_ui_url.indexOf("192.168.8.236") != -1) {
  39. return "http://192.168.8.236:9000/"
  40. } else {
  41. return "http://10.112.0.199:9000/"
  42. }
  43. }
  44. function getImageaddr() {
  45. if (base_ui_url.indexOf("file_yanhai.jsxt.jsjtyxt.com") != -1) {
  46. return "http://file_release_yanhai.jsxt.jsjtyxt.com:8283/";
  47. } else if (base_ui_url.indexOf("file_release_yanhai") != -1) {
  48. return "http://file_release_yanhai.jsxt.jsjtyxt.com:8283/";
  49. } else if (base_ui_url.indexOf("localhost") != -1) {
  50. // return "http://10.112.0.199:7000/"
  51. // return "http://file_release_yanhai.jsxt.jsjtyxt.com:8283/";
  52. return "http://localhost:8081/";
  53. } else if (base_ui_url.indexOf("192.168.8.236") != -1) {
  54. return "http://192.168.8.236/"
  55. } else if (base_ui_url.indexOf("200.200.19.126") != -1) {
  56. return "http://200.200.19.126/"
  57. } else {
  58. return "http://10.112.0.199/"
  59. }
  60. }
  61. function getTaskaddr() {
  62. if (base_ui_url.indexOf("jsjtyxt.com") != -1) {
  63. return "http://task_yanhai.jsxt.jsjtyxt.com:8283/";
  64. } else if (base_ui_url.indexOf("localhost") != -1) {
  65. // return "http://10.112.0.199:8099/"
  66. return "http://localhost:8099/"
  67. } else if (base_ui_url.indexOf("192.168.8.236") != -1) {
  68. return "http://192.168.8.236:8099/"
  69. } else {
  70. return "http://10.112.0.199:8099/"
  71. }
  72. }