diff --git a/.env.development b/.env.development index 182dbd7..e11cd79 100644 --- a/.env.development +++ b/.env.development @@ -1,3 +1,3 @@ ENV = 'development' -VUE_APP_BASE_API = 'https://lcny.sk797.cn' \ No newline at end of file +VUE_APP_BASE_API = 'https://lcny-api.peidikeji.cn' \ No newline at end of file diff --git a/src/pages/index/monitor.vue b/src/pages/index/monitor.vue index 9e66986..ec03804 100644 --- a/src/pages/index/monitor.vue +++ b/src/pages/index/monitor.vue @@ -135,7 +135,7 @@ - + @@ -164,7 +164,7 @@ @@ -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') } }