From f36c2c4f972fd8d1ef114beb2d7652d660fadead Mon Sep 17 00:00:00 2001 From: yxq Date: Fri, 22 Nov 2024 09:32:45 +0800 Subject: [PATCH] =?UTF-8?q?=E5=A4=A7=E5=B1=8F=20=E6=BC=94=E7=A4=BA?= =?UTF-8?q?=E8=BF=98=E5=8E=9F?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- SafeCampus.WEB/src/views/screen/classroom.vue | 16 ++++++-------- .../views/screen/component/index/video.vue | 22 +++++-------------- SafeCampus.WEB/src/views/screen/stureturn.vue | 16 ++++++-------- 3 files changed, 20 insertions(+), 34 deletions(-) diff --git a/SafeCampus.WEB/src/views/screen/classroom.vue b/SafeCampus.WEB/src/views/screen/classroom.vue index dd5d1b4..0946790 100644 --- a/SafeCampus.WEB/src/views/screen/classroom.vue +++ b/SafeCampus.WEB/src/views/screen/classroom.vue @@ -117,15 +117,13 @@ const showRts = sensorId_ => { let rtsUrl_ = "/static/rtsPlayer.html?height=556px&rtsUrl="; sensorId.value = sensorId_; screenApi.detail({ sensorId: sensorId_ }).then(res => { - // if (res.code == 200) { - // if (res.data.rtsPullStreamUrls[0]) { - // rtsUrl.value = rtsUrl_ + res.data.rtsPullStreamUrls[0].url; - // } - // streamId.value = res.data.streamId; - // videoToken.value = res.data.videoToken; - // } - // 演示 - rtsUrl.value = rtsUrl_ + "http://123.57.209.16:8004/video/5.mp4"; + if (res.code == 200) { + if (res.data.rtsPullStreamUrls[0]) { + rtsUrl.value = rtsUrl_ + res.data.rtsPullStreamUrls[0].url; + } + streamId.value = res.data.streamId; + videoToken.value = res.data.videoToken; + } }); } }; diff --git a/SafeCampus.WEB/src/views/screen/component/index/video.vue b/SafeCampus.WEB/src/views/screen/component/index/video.vue index 898dd0b..f24dbf9 100644 --- a/SafeCampus.WEB/src/views/screen/component/index/video.vue +++ b/SafeCampus.WEB/src/views/screen/component/index/video.vue @@ -121,22 +121,12 @@ const itemClick = item => { let rtsUrl_ = "/static/rtsPlayer.html?height=487px&rtsUrl="; sensorId.value = item.sensorId; screenApi.detail({ sensorId: item.sensorId }).then(res => { - // if (res.code == 200) { - // if (res.data.rtsPullStreamUrls[0]) { - // rtsUrl.value = rtsUrl_ + res.data.rtsPullStreamUrls[0].url; - // } - // streamId.value = res.data.streamId; - // videoToken.value = res.data.videoToken; - // } - // 演示 - if (item.sensorName == "厨房(良景)") { - rtsUrl.value = rtsUrl_ + "http://123.57.209.16:8004/video/4.mp4"; - } - if (item.sensorName == "大厅(魔豆)") { - rtsUrl.value = rtsUrl_ + "http://123.57.209.16:8004/video/2.mp4"; - } - if (item.sensorName == "教学区域(海康)") { - rtsUrl.value = rtsUrl_ + "http://123.57.209.16:8004/video/5.mp4"; + if (res.code == 200) { + if (res.data.rtsPullStreamUrls[0]) { + rtsUrl.value = rtsUrl_ + res.data.rtsPullStreamUrls[0].url; + } + streamId.value = res.data.streamId; + videoToken.value = res.data.videoToken; } }); }; diff --git a/SafeCampus.WEB/src/views/screen/stureturn.vue b/SafeCampus.WEB/src/views/screen/stureturn.vue index 425b1f3..ed2e265 100644 --- a/SafeCampus.WEB/src/views/screen/stureturn.vue +++ b/SafeCampus.WEB/src/views/screen/stureturn.vue @@ -132,15 +132,13 @@ const showRts = sensorId_ => { let rtsUrl_ = "/static/rtsPlayer.html?height=446px&rtsUrl="; sensorId.value = sensorId_; screenApi.detail({ sensorId: sensorId_ }).then(res => { - // if (res.code == 200) { - // if (res.data.rtsPullStreamUrls[0]) { - // rtsUrl.value = rtsUrl_ + res.data.rtsPullStreamUrls[0].url; - // } - // streamId.value = res.data.streamId; - // videoToken.value = res.data.videoToken; - // } - // 演示 - rtsUrl.value = rtsUrl_ + "http://123.57.209.16:8004/video/5.mp4"; + if (res.code == 200) { + if (res.data.rtsPullStreamUrls[0]) { + rtsUrl.value = rtsUrl_ + res.data.rtsPullStreamUrls[0].url; + } + streamId.value = res.data.streamId; + videoToken.value = res.data.videoToken; + } }); } };