修改监控

master
ihzero 2023-11-23 21:42:12 +08:00
parent f1e8e6dc3c
commit ce7d5bd20a
2 changed files with 12 additions and 9 deletions

View File

@ -1,3 +1,3 @@
ENV = 'development'
VUE_APP_BASE_API = 'https://lcny.sk797.cn'
VUE_APP_BASE_API = 'https://lcny-api.peidikeji.cn'

View File

@ -135,7 +135,7 @@
</view>
<view class="content-box">
<view class="video_ul" v-show="current == 0">
<view class="video_li" v-for="(video, index) in videoList" :key="index">
<view class="video_li" v-for="(video, index) in videoList" :key="video.video_url+index">
<view class="video_cd">
<!-- #ifdef H5 -->
<!-- {{ video.video_url }} -->
@ -164,7 +164,7 @@
<view
class="video_li"
v-for="(video, index) in videoList2"
:key="index"
:key="video.video_url+index"
>
<view class="video_cd">
<!-- #ifdef H5 -->
@ -381,6 +381,11 @@ export default {
console.log(data, 'queryWebsocketIp')
if (data.code == 200) {
this.websocket = data.data
let url = `${this.websocket.ssl?'wss':'ws'}://${this.websocket.host?this.websocket.host:this.websocket.ip+':'+this.websocket.port}`
this.websocket.url = url
// this.websocket.ip = 'lcny-rtsp.peidikeji.cn'
// console.log(this.websocket);
// this.websocket.id='lcny-rtsp.peidikeji.cn'
}
} catch (e) {
//TODO handle the exception
@ -423,10 +428,10 @@ export default {
let list = data.data
for (let item of list) {
let url = item.extends.rtsp_url
let { ip, port } = this.websocket
let { ip, port ,url:uri} = this.websocket
// ip='lcny-rtsp.peidikeji.cn'
if (url) {
item.video_url = `ws://${ip}:${port}/rtsp?url=${window.btoa(
item.video_url = `${uri}/rtsp?url=${window.btoa(
url
)}`
}
@ -510,9 +515,7 @@ export default {
)
let p_url = `rtsp://${username}:${password}@${ip}:${port}/cam/playback?channel=${passage}&subtype=0`
let rtsp_url = `${p_url}&starttime=${stime}&endtime=${etime}`
item.video_url = `ws://${this.websocket.ip}:${
this.websocket.port
}/rtsp?url=${window.btoa(rtsp_url)}}`
item.video_url = `${this.websocket.url}/rtsp?url=${window.btoa(rtsp_url)}}`
console.log(rtsp_url, item.video_url, '视频url')
}
}