env.js 414 B

123456789101112131415161718192021222324
  1. let configs = {
  2. baseUrl: 'localhost',
  3. isProduction: false,
  4. apis: {
  5. sz: '',
  6. }
  7. };
  8. if (process.env.NODE_ENV === 'development') {
  9. // 测试环境
  10. configs = Object.assign(configs, {
  11. baseUrl: 'http://127.0.0.1:8090',
  12. });
  13. }
  14. if (process.env.NODE_ENV === 'production') {
  15. // 生产环境
  16. configs = Object.assign(configs, {
  17. baseUrl: 'https://xxx/',
  18. // isProduction: true,
  19. });
  20. }
  21. export default configs;