proxy.ts 1.2 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546
  1. /**
  2. * 在生产环境 代理是无法生效的,所以这里没有生产环境的配置
  3. * The agent cannot take effect in the production environment
  4. * so there is no configuration of the production environment
  5. * For details, please see
  6. * https://pro.ant.design/docs/deploy
  7. */
  8. export default {
  9. dev: {
  10. '/api/': {
  11. // target: 'http://test.api.zanxiangwl.com',
  12. // target: 'https://game.84game.cn',
  13. target: 'https://testapi.zanxiangwl.com',
  14. changeOrigin: true,
  15. pathRewrite: { '/api': '' },
  16. },
  17. '/erpApi/': {
  18. target: 'https://testapi.zanxiangwl.com',
  19. // target: 'https://api.zanxiangwl.com',
  20. changeOrigin: true,
  21. pathRewrite: { '/erpApi': '' },
  22. },
  23. '/gameApi/': {
  24. // target: 'http://test.api.zanxiangwl.com',//服务器
  25. target: 'https://game.84game.cn',//服务器
  26. changeOrigin: true,
  27. pathRewrite: { '^/gameApi/': '' },
  28. },
  29. },
  30. test: {
  31. '/api/': {
  32. target: 'https://preview.pro.ant.design',
  33. changeOrigin: true,
  34. pathRewrite: { '^': '' },
  35. },
  36. },
  37. pre: {
  38. '/api/': {
  39. target: 'your pre url',
  40. changeOrigin: true,
  41. pathRewrite: { '^': '' },
  42. },
  43. },
  44. }