config.ts 697 B

123456789101112131415161718192021222324252627282930313233
  1. /*
  2. * @Author: 文帅
  3. * @Date: 2022-03-08 16:37:24
  4. * @LastEditTime: 2022-03-08 17:35:36
  5. * @LastEditors: 文帅
  6. * @Description:
  7. */
  8. const currentConfig = {
  9. downloadAppUrl: 'https://m.winhc.cn/wx-mobile/download/index.html'
  10. }
  11. const developmentConfig = {
  12. name: 'development',
  13. baseUrl: 'https://twww.winhc.net/api',
  14. ...currentConfig
  15. }
  16. const testConfig = {
  17. name: 'test',
  18. baseUrl: 'https://twww.winhc.net/api',
  19. ...currentConfig
  20. }
  21. const productionConfig = {
  22. name: 'production',
  23. baseUrl: 'https://www.winhc.net/api',
  24. ...currentConfig
  25. }
  26. const env = [developmentConfig, testConfig, productionConfig]
  27. export const config = env.find(item =>
  28. item.name === import.meta.env.MODE
  29. )!