proxy.ts 1.3 KB

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