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) {