config.js 1.0 KB

12345678910111213141516171819202122232425262728293031323334353637383940
  1. // 本地开发环境
  2. const local = {
  3. api: 'https://openapi.dev.bozedu.net/',
  4. oss: 'https://openapi.dev.bozedu.net/',
  5. uc: 'https://uc.dev.bozedu.net/',
  6. }
  7. // 测试服环境
  8. const development = {
  9. web_pc: 'https://dyawdev.bozedu.top/',
  10. web_mobile: 'https://dyawdevm.bozedu.top/',
  11. api: 'https://openapi.dev.bozedu.net/',
  12. oss: 'https://openapi.dev.bozedu.net/',
  13. uc: 'https://uc.dev.bozedu.net/',
  14. }
  15. // // 正式服环境
  16. const production = {
  17. web_pc: 'https://dyaw.bozedu.net/',
  18. web_mobile: 'https://dyawm.bozedu.net/',
  19. api: 'https://openapi.bozedu.net/',
  20. oss: 'https://openapi.bozedu.net/',
  21. uc: 'https://uc.bozedu.net/',
  22. }
  23. function isWhich() {
  24. if (window.location.href.startsWith(development.web_pc) || window.location.href.startsWith(development.web_mobile)) {
  25. return development
  26. } else if (window.location.href.startsWith(production.web_pc) || window.location.href.startsWith(production.web_mobile)) {
  27. return production
  28. } else {
  29. return local
  30. }
  31. }
  32. window.GLOBAL_CONFIG = production//isWhich()
  33. window.RTC_USE = true