You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

22 lines
717 B

1 year ago
  1. /**
  2. * 项目的一些定制化配置
  3. */
  4. const isProd = process.env.NODE_ENV === 'production'
  5. const proxyConfig = {
  6. proxy: {
  7. //'/api': 'https://testapi.aiyxlib.com/api',
  8. // 'url': 'http://restapi.amap.com/',
  9. // url: "https://testapi.aiyxlib.com/api",
  10. 'url': "http://192.168.99.111:5001/api",
  11. },
  12. prodProxy: {
  13. //'url': "http://192.168.99.111:5001",
  14. //'url': 'https://testapi.aiyxlib.com',
  15. 'url': 'https://rosefinchapi.aiyxlib.com/api'
  16. }
  17. }
  18. export default {
  19. // 代理配置,可支持多个代理,key为前缀,命中后,会把前缀去掉,转发到代理服务器
  20. proxy: isProd ? proxyConfig.prodProxy.url : proxyConfig.proxy.url
  21. }