config.js 624 B

1234567891011121314151617181920212223242526272829
  1. // 本地开发环境
  2. const local = {
  3. api: 'http://jnjymf_api.bozedu.top/',
  4. oss: 'http://jnjymf_api.bozedu.top/'
  5. }
  6. // 测试服环境
  7. const development = {
  8. api: 'http://jnjymf_api.bozedu.top/',
  9. oss: 'http://jnjymf_api.bozedu.top/'
  10. }
  11. // 正式服环境
  12. const production = {
  13. api: 'http://60.188.226.44:8090/',
  14. oss: 'http://60.188.226.44:8090/'
  15. }
  16. function isWhich() {
  17. if (window.location.host.includes('jnjymf_web.bozedu.top')) {
  18. return development
  19. } else if (window.location.host.includes('60.188.226.44:8090')) {
  20. return production
  21. } else {
  22. return local
  23. }
  24. }
  25. window.GLOBAL_CONFIG = isWhich()