From 682b56a2ec5b7063ec4fd48e1821488e5b7ad1be Mon Sep 17 00:00:00 2001 From: 16337 <1633794139@qq.com> Date: Wed, 4 Feb 2026 09:35:35 +0800 Subject: [PATCH] =?UTF-8?q?=E4=BF=AE=E5=A4=8D=E5=BC=80=E5=8F=91=E7=8E=AF?= =?UTF-8?q?=E5=A2=83=E6=88=AA=E5=9B=BEURL=E7=BC=BA=E5=B0=91/dev-api?= =?UTF-8?q?=E5=89=8D=E7=BC=80=E9=97=AE=E9=A2=98?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit img标签src不走axios,需手动加VUE_APP_BASE_API前缀, 否则开发环境下请求不经过devServer代理直接404 Co-Authored-By: Claude Opus 4.5 --- web/src/views/cameraConfig/roiConfig.vue | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/web/src/views/cameraConfig/roiConfig.vue b/web/src/views/cameraConfig/roiConfig.vue index fea401b3c..0dab22cfc 100644 --- a/web/src/views/cameraConfig/roiConfig.vue +++ b/web/src/views/cameraConfig/roiConfig.vue @@ -114,7 +114,8 @@ export default { this.cameraId = decodeURIComponent(this.$route.params.cameraId) this.srcUrl = this.$route.query.srcUrl || '' if (this.srcUrl) { - this.snapUrl = `/api/ai/roi/snap?url=${encodeURIComponent(this.srcUrl)}` + const base = process.env.NODE_ENV === 'development' ? process.env.VUE_APP_BASE_API : '' + this.snapUrl = `${base}/api/ai/roi/snap?url=${encodeURIComponent(this.srcUrl)}` } this.loadRois() }, @@ -146,7 +147,8 @@ export default { }, refreshSnap() { if (this.srcUrl) { - this.snapUrl = `/api/ai/roi/snap?url=${encodeURIComponent(this.srcUrl)}&t=${Date.now()}` + const base = process.env.NODE_ENV === 'development' ? process.env.VUE_APP_BASE_API : '' + this.snapUrl = `${base}/api/ai/roi/snap?url=${encodeURIComponent(this.srcUrl)}&t=${Date.now()}` } }, onRoiDrawn(data) {