config.js 1.1 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546
  1. // 本地开发环境
  2. const local = {
  3. web_pc: 'https://nml.bozedu.net/',
  4. web_mobile: 'https://nmlm.bozedu.net/',
  5. api: 'https://nmlopenapi.bozedu.net/',
  6. oss: 'https://nmlopenapi.bozedu.net/',
  7. uc: 'https://uc.bozedu.net/',
  8. appid: 'wx15eaba41e9f51eb9',
  9. }
  10. // 测试服环境
  11. const development = {
  12. web_pc: 'https://nml.bozedu.net/',
  13. web_mobile: 'https://nmlm.bozedu.net/',
  14. uc: 'https://uc.bozedu.net/',
  15. api: 'https://nmlopenapi.bozedu.net/',
  16. oss: 'https://nmlopenapi.bozedu.net/',
  17. appid: 'wx15eaba41e9f51eb9',
  18. }
  19. // 正式服环境
  20. const production = {
  21. web_pc: 'https://nml.bozedu.net/',
  22. web_mobile: 'https://nmlm.bozedu.net/',
  23. uc: 'https://uc.bozedu.net/',
  24. api: 'https://nmlopenapi.bozedu.net/',
  25. oss: 'https://nmlopenapi.bozedu.net/',
  26. appid: 'wx15eaba41e9f51eb9',
  27. }
  28. function isWhich() {
  29. if (window.location.host.includes('nmlm.bozedu.net')) {
  30. return development
  31. } else if (window.location.host.includes('nmlm.bozedu.net')) {
  32. return production
  33. } else {
  34. return local
  35. }
  36. }
  37. window.GLOBAL_CONFIG = isWhich()