From 027b94a11518d94e511e86954ef9c0e6928df733 Mon Sep 17 00:00:00 2001 From: z_yu <1534695664@qq.com> Date: Tue, 13 Sep 2022 10:33:41 +0800 Subject: [PATCH] =?UTF-8?q?=E6=91=84=E5=83=8F=E5=A4=B4=E7=AB=AF=E5=8F=A3?= =?UTF-8?q?=E9=85=8D=E7=BD=AE=E4=BF=AE=E6=94=B9?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .env.development | 2 +- src/views/storeManage/warehouse3D/module/video.vue | 9 +++++---- 2 files changed, 6 insertions(+), 5 deletions(-) diff --git a/.env.development b/.env.development index 6740be0..deac763 100644 --- a/.env.development +++ b/.env.development @@ -5,7 +5,7 @@ ENV = 'development' #内网服务地址 VUE_APP_BASE_API = 'http://192.168.99.107:7070' VUE_APP_WS_API = 'ws://192.168.99.107:7071' -VUE_APP_CAMERA_API = '192.168.99.107' +VUE_APP_CAMERA_API = '192.168.99.107:3000' # 刘力-本地服地址 #VUE_APP_BASE_API = 'http://192.168.99.65:7070' diff --git a/src/views/storeManage/warehouse3D/module/video.vue b/src/views/storeManage/warehouse3D/module/video.vue index 78496d1..b2ef5f3 100644 --- a/src/views/storeManage/warehouse3D/module/video.vue +++ b/src/views/storeManage/warehouse3D/module/video.vue @@ -58,7 +58,7 @@ export default { // $.post('http://127.0.0.1:3000/cameras/close/', { rtspUrl: $('#rtsp').val() }, function(result) { const data = { rtspUrl: this.rtspUrl } // console.log(process.env.VUE_APP_CAMERA_API) - const Uri = 'http://' + process.env.VUE_APP_CAMERA_API + ':3000/cameras/close/' + const Uri = 'http://' + process.env.VUE_APP_CAMERA_API + '/cameras/close/' axios.post(Uri, qs.stringify(data), { headers: { @@ -76,8 +76,8 @@ export default { // this.play() }, play() { - const data = { rtspUrl: this.rtspUrl, size: '1024*768' } - const Uri = 'http://' + process.env.VUE_APP_CAMERA_API + ':3000/cameras/' + const data = { rtspUrl: this.rtspUrl, size: '1024*768', port: process.env.VUE_APP_CAMERA_API.split(':')[1], videoRoute: this.camConfig.deviceInfo.videoRoute } + const Uri = 'http://' + process.env.VUE_APP_CAMERA_API + '/cameras/' axios.post(Uri, qs.stringify(data), { headers: { @@ -86,7 +86,8 @@ export default { } ).then(res => { // res.data.port - const url = 'ws://' + process.env.VUE_APP_CAMERA_API + ':' + res.data.port + const ip = process.env.VUE_APP_CAMERA_API.split(':')[0] + const url = 'ws://' + ip + ':' + res.data.port // var canvas = document.getElementById('canvas') const opt = { contianer: this.$refs['canvas-wrap'],