proxy.ts 1.3 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253
  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/api',
  12. target: 'http://api.zanxiangwl.com',
  13. changeOrigin: true,
  14. pathRewrite: { '/api': '' },
  15. },
  16. '/wapi/': {
  17. target: 'http://api.zanxiangnet.com',//服务器
  18. changeOrigin: true,
  19. pathRewrite: { '^/wapi/': '' },
  20. },
  21. '/wxapi/':{//小程序
  22. target: 'http://report.zanxiangwl.com',//服务器
  23. changeOrigin: true,
  24. pathRewrite: { '^/wxapi/': '' },
  25. },
  26. '/dapi/': {
  27. target: 'http://data.zanxiangnet.com',//数据平台
  28. changeOrigin: true,
  29. pathRewrite: { '^/dapi/': '' },
  30. },
  31. // '/dapi/': {
  32. // target: 'http://data.zanxiangnet.com:8009/',//数据平台
  33. // changeOrigin: true,
  34. // pathRewrite: { '^/dapi/': '' },
  35. // },
  36. },
  37. test: {
  38. '/api/': {
  39. target: 'https://preview.pro.ant.design',
  40. changeOrigin: true,
  41. pathRewrite: { '^': '' },
  42. },
  43. },
  44. pre: {
  45. '/api/': {
  46. target: 'your pre url',
  47. changeOrigin: true,
  48. pathRewrite: { '^': '' },
  49. },
  50. },
  51. }