vue.config.js 1.0 KB

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