From 7dc094b98b357f6b08844ef377c85444447af6f0 Mon Sep 17 00:00:00 2001 From: liangbin <15536829364@163.com> Date: Wed, 27 Aug 2025 15:27:41 +0800 Subject: [PATCH] =?UTF-8?q?=E5=A4=A7=E5=B1=8F=E9=85=8D=E7=BD=AE=E9=A1=B5?= =?UTF-8?q?=E9=9D=A2=E5=B5=8C=E5=A5=97=E8=83=BD=E7=AE=A1=E5=B9=B3=E5=8F=B0?= =?UTF-8?q?=E8=8B=8F=E5=B7=9E=E7=AB=99,=E8=AE=BE=E7=BD=AE=E8=8B=8F?= =?UTF-8?q?=E5=B7=9E=E7=AB=99=E4=BB=A3=E7=90=86?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/view/LargeScreen/cockpit.vue | 23 ++++++++++++++++++++--- src/view/components/projectModal.vue | 9 ++++----- vite.config.js | 20 ++++++++++++++++++++ 3 files changed, 44 insertions(+), 8 deletions(-) diff --git a/src/view/LargeScreen/cockpit.vue b/src/view/LargeScreen/cockpit.vue index 6af1605..072e946 100644 --- a/src/view/LargeScreen/cockpit.vue +++ b/src/view/LargeScreen/cockpit.vue @@ -1,5 +1,22 @@ \ No newline at end of file + + + \ No newline at end of file diff --git a/src/view/components/projectModal.vue b/src/view/components/projectModal.vue index a8d1007..34df6a7 100644 --- a/src/view/components/projectModal.vue +++ b/src/view/components/projectModal.vue @@ -304,6 +304,8 @@ \ No newline at end of file diff --git a/vite.config.js b/vite.config.js index 3fc4092..e427c64 100644 --- a/vite.config.js +++ b/vite.config.js @@ -16,6 +16,26 @@ export default defineConfig({ '@': fileURLToPath(new URL('./src', import.meta.url)) } }, + proxy: { + ['/dev-api']: { + target: `http://172.16.1.103:8081/njbzApi`, // 汤 + // target: `http://119.57.137.22:8000/njbzApi`, // 外网 + changeOrigin: true, + pathRewrite: { + ["^" + '/dev-api']: "", + }, + }, + ['/njbzControlApi']: { + // target: `http://119.57.137.22:8081/iotApi`, + // target: `http://119.57.137.22:9000/njbzControlApi`, + target: `http://172.16.1.155:8081/njbzControlApi`, // 秦 + changeOrigin: true, + pathRewrite: { + ["^" + '/njbzControlApi']: "", + }, + rewrite: (path) => path.replace(/^\/dev-api\/njbzControlApi/, ""), + }, + }, server: { host: '0.0.0.0', // 关键:允许通过IP访问(监听所有网络接口) port: 86,