From e4e5e8edb99336584956e2ee4b18a5036a101046 Mon Sep 17 00:00:00 2001 From: 961867786 <@Zz232@)23> Date: Wed, 11 Mar 2026 10:21:43 +0800 Subject: [PATCH] =?UTF-8?q?=E5=BC=80=E5=8F=91=E6=8E=A5=E5=8F=A3=E9=85=8D?= =?UTF-8?q?=E7=BD=AE?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- vue.config.js | 89 +++++++++++++++++++++++++++------------------------ 1 file changed, 47 insertions(+), 42 deletions(-) diff --git a/vue.config.js b/vue.config.js index bc5a895..15f40ea 100644 --- a/vue.config.js +++ b/vue.config.js @@ -1,48 +1,53 @@ module.exports = { - css: { - loaderOptions: { - } - }, - configureWebpack: { - performance: { - hints: false + css: { + loaderOptions: { + } }, - devServer: { - host: '0.0.0.0', - port: 8002, - contentBase: ['./node_modules', './public'], - publicPath: '/', - disableHostCheck: true, - proxy: { - '/api': { - // target: `http://localhost:8080/`, // 本地开发环境 - target: `http://218.59.175.43:92`, // 内网测试环境 - // target: `http://116.255.223.226:8082/nsgk_test/`, // 公网测试环境 - // target: `http://192.168.0.105:8090`, // 公网测试环境 - changeOrigin: true, - onProxyReq: function (proxyReq, req) { - console.log( - '[HPM] Origin changed from ' + - req.headers.host + - ' ~> ' + - proxyReq.getHeader('host') - ); - } + configureWebpack: { + performance: { + hints: false }, - '/geoserver': { - target: 'http://localhost:37300', - logLevel: 'debug', - changeOrigin: true, - onProxyReq: function (proxyReq, req) { - console.log( - '[HPM] Origin changed from ' + - req.headers.host + - ' ~> ' + - proxyReq.getHeader('host') - ); - } + devServer: { + host: '0.0.0.0', + port: 8002, + contentBase: ['./node_modules', './public'], + publicPath: '/', + disableHostCheck: true, + proxy: { + '/api': { + // target: `http://localhost:8080/`, // 本地开发环境 + // target: `http://218.59.175.43:92`, // 内网测试环境 + // target: `http://218.59.175.44:8082/nsgk_test/`, // 公网测试环境 + // target: `http://eqixingguan.nongshen.net/`, // 公网测试环境 + // target: `http://218.59.175.44:99/gz_qixing/`, // 七星关 + target: `http://218.59.175.44:99/dengzhoushi/`, // 邓州 + changeOrigin: true, + pathRewrite: { + '^/api': '' + }, + onProxyReq: function (proxyReq, req) { + console.log( + '[HPM] Origin changed from ' + + req.headers.host + + ' ~> ' + + proxyReq.getHeader('host') + ); + } + }, + '/geoserver': { + target: 'http://localhost:37300', + logLevel: 'debug', + changeOrigin: true, + onProxyReq: function (proxyReq, req) { + console.log( + '[HPM] Origin changed from ' + + req.headers.host + + ' ~> ' + + proxyReq.getHeader('host') + ); + } + } + } } - } } - } };