config.js 1.3 KB

12345678910111213141516171819202122232425262728293031323334353637
  1. let APP_SERVER_URL = "";
  2. if (process.env.NODE_ENV === "development") {
  3. // 开发环境
  4. APP_SERVER_URL = "/api";
  5. } else {
  6. // 生产环境
  7. //APP_SERVER_URL = 'http://cloud.jeeplus.org/api'
  8. // APP_SERVER_URL = 'http://192.168.2.131/api'
  9. // APP_SERVER_URL = "http://cpaoa.xgccpm.com/api";
  10. const host = window.location.hostname;
  11. if (host === "cpaoa.xgccpm.com") {
  12. console.log("cpaoa.xgccpm.com")
  13. APP_SERVER_URL = "http://cpaoa.xgccpm.com/api";
  14. } else if (host === "cpapmis.xgccpm.com") {
  15. console.log("cpapmis.xgccpm.com")
  16. APP_SERVER_URL = "http://cpapmis.xgccpm.com/api";
  17. } else if (host === "amc.xgccpm.com") {
  18. console.log("amc.xgccpm.com")
  19. APP_SERVER_URL = "http://amc.xgccpm.com/api";
  20. } else if (host === "zs.xgccpm.com") {
  21. console.log("zs.xgccpm.com")
  22. APP_SERVER_URL = "http://zs.xgccpm.com/api";
  23. } else if (host === "wz.xgccpm.com") {
  24. console.log("wz.xgccpm.com")
  25. APP_SERVER_URL = "http://wz.xgccpm.com/api";
  26. } else if (host === "sz.xgccpm.com") {
  27. console.log("sz.xgccpm.com")
  28. APP_SERVER_URL = "http://sz.xgccpm.com/api";
  29. } else if (host === "jct.xgccpm.com") {
  30. console.log("jct.xgccpm.com")
  31. APP_SERVER_URL = "http://jct.xgccpm.com/api";
  32. }
  33. }
  34. APP_SERVER_URL = APP_SERVER_URL;
  35. export default APP_SERVER_URL;