serverConfig.js 731 B

1234567891011121314151617181920212223
  1. let lang = (navigator && navigator.language && navigator.language.toLowerCase()) || 'zh'
  2. let server = "https://api.cocorobo.cn"
  3. let host = "https://login.cocorobo.cn"
  4. let edu = "https://api.edu.cocorobo.cn"
  5. if (lang === 'zh-cn' || lang === 'zh') {
  6. server = "https://api.cocorobo.cn"
  7. host = "https://login.cocorobo.cn"
  8. edu = "https://api.edu.cocorobo.cn"
  9. } else if (lang === 'zh-tw' || lang === 'zh-hk') {
  10. server = "https://api.cocorobo.hk"
  11. host = "https://login.cocorobo.hk"
  12. edu = "https://api.edu.cocorobo.hk"
  13. } else {
  14. server = "https://api.cocorobo.com"
  15. host = "https://login.cocorobo.com"
  16. edu = "https://api.edu.cocorobo.com"
  17. }
  18. const config = {
  19. server, host, edu
  20. }
  21. export default config