vue.config.js 1.4 KB

12345678910111213141516171819202122232425262728293031
  1. const { defineConfig } = require('@vue/cli-service')
  2. module.exports = defineConfig({
  3. transpileDependencies: true,
  4. devServer: {
  5. host: 'localhost', // 本地地址
  6. port: 8081, // 端口号
  7. open: true, // 配置项目在启动时自动在浏览器打开
  8. proxy: {
  9. '/appointment' : { // '/api'是代理标识,一般是每个接口前的相同部分
  10. target: "http://114.135.61.186:8339", // 请求地址,一般是服务器地址
  11. changeOrigin: true, // 是否进行跨域
  12. pathRewrite: { // pathRewrite的作用是把请求接口中的 '/api'替换掉,一般是替换为空""
  13. }
  14. },
  15. '/report' : { // '/api'是代理标识,一般是每个接口前的相同部分
  16. target: "http://114.135.61.186:8339", // 请求地址,一般是服务器地址
  17. changeOrigin: true, // 是否进行跨域
  18. secure:true,
  19. pathRewrite: { // pathRewrite的作用是把请求接口中的 '/api'替换掉,一般是替换为空""
  20. }
  21. },
  22. '/UMIS_FILE':{
  23. target: "http://114.135.61.186:21020/sc-login/nav", // 请求地址,一般是服务器地址
  24. changeOrigin: true, // 是否进行跨域
  25. pathRewrite: { // pathRewrite的作用是把请求接口中的 '/api'替换掉,一般是替换为空""
  26. }
  27. }
  28. }
  29. }
  30. })