WXL
2025-12-29 d10d3662fffb40ec0002b0a6010fd57f6a21ca84
vue.config.js
@@ -5,7 +5,7 @@
  return path.join(__dirname, dir)
}
const name = process.env.VUE_APP_TITLE || '若依管理系统' // 网页标题
const name = process.env.VUE_APP_TITLE || '青附院OPO管理平台' // 网页标题
const port = process.env.port || process.env.npm_config_port || 80 // 端口
@@ -33,11 +33,22 @@
    proxy: {
      // detail: https://cli.vuejs.org/config/#devserver-proxy
      [process.env.VUE_APP_BASE_API]: {
        target: `http://localhost:8080`,
        // target:`http://slb.hospitalstar.com:9091`,
        // target1:`http://192.168.2.3:8080`,
        target:`http://localhost:8080`,
        // target:`http://192.168.100.10:8080`,
        // target:`http://192.168.100.137:8080`,
        // target: `https://slb.hospitalstar.com:9093`,
        changeOrigin: true,
        pathRewrite:  (path) => path.replace(/^\/dev-api/, '')
        pathRewrite: {
          ['^' + process.env.VUE_APP_BASE_API]: ''
        }
      },
      //当pdf和数据接口不在同一个请求地址下时,为pdf预览追加一个代理
      '/pdf': {
        target: 'http://192.168.1.4/pdf/data',
        changOrigin: true,
        pathRewrite: {
            '^/pdf': ''
        }
      }
    },
    disableHostCheck: true
@@ -47,6 +58,7 @@
    resolve: {
      alias: {
        '@': resolve('src')
      }
    }
  },
@@ -78,7 +90,7 @@
            .plugin('ScriptExtHtmlWebpackPlugin')
            .after('html')
            .use('script-ext-html-webpack-plugin', [{
            // `runtime` must same as runtimeChunk name. default is `runtime`
              // `runtime` must same as runtimeChunk name. default is `runtime`
              inline: /runtime\..*\.js$/
            }])
            .end()
@@ -108,8 +120,8 @@
            })
          config.optimization.runtimeChunk('single'),
          {
             from: path.resolve(__dirname, './public/robots.txt'), //防爬虫文件
             to: './' //到根目录下
            from: path.resolve(__dirname, './public/robots.txt'), //防爬虫文件
            to: './' //到根目录下
          }
        }
      )