vue.config.js 983 B

12345678910111213141516171819202122232425262728293031323334
  1. // let targetUrl = 'https://pay.dayaedu.com'
  2. let targetUrl = 'http://192.168.3.27:8088'
  3. module.exports = {
  4. devServer: {
  5. open: process.platform === 'darwin',
  6. host: '0.0.0.0',
  7. https: false,
  8. hotOnly: false,
  9. // 查阅 https://github.com/vuejs/vue-doc-zh-cn/vue-cli/cli-service.md#配置代理
  10. proxy: {
  11. '/user': {
  12. target: targetUrl,
  13. changeOrigin: true,
  14. ws: true,
  15. '^/user': '/user',
  16. xfwd: true
  17. },
  18. '/yqpay': {
  19. target: targetUrl,
  20. changeOrigin: true,
  21. ws: true,
  22. '^/yqpay': '/yqpay',
  23. xfwd: true
  24. },
  25. '/order': {
  26. target: targetUrl,
  27. changeOrigin: true,
  28. ws: true,
  29. '^/order': '/order',
  30. xfwd: true
  31. }
  32. }, // string | Object
  33. }
  34. }