config.js 739 B

123456789101112131415161718192021222324
  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 === "xxx.com") {
  12. APP_SERVER_URL = "https://xxx.com/api";
  13. } else if (host === "xxx.com") {
  14. APP_SERVER_URL = "https://xxx.com/api";
  15. } else if (host === "xxx.com") {
  16. APP_SERVER_URL = "https://xxx.com/api";
  17. } else if (host === "xxx.com") {
  18. APP_SERVER_URL = "https://xxx.com/api";
  19. }
  20. }
  21. APP_SERVER_URL = APP_SERVER_URL;
  22. export default APP_SERVER_URL;