|
|
@ -16,10 +16,10 @@ |
|
|
|
token: "", |
|
|
|
videoSrc:"", |
|
|
|
userData:{ |
|
|
|
"userName": "apizhsq", |
|
|
|
"password": "12345678@df", |
|
|
|
"type": 1 |
|
|
|
} |
|
|
|
"userName": "apizhsq", |
|
|
|
"password": "12345678@df", |
|
|
|
"type": 1 |
|
|
|
} |
|
|
|
}; |
|
|
|
}, |
|
|
|
methods: { |
|
|
@ -28,26 +28,22 @@ |
|
|
|
token: this.token, |
|
|
|
}; |
|
|
|
const iframe = this.$refs.myIframe; |
|
|
|
console.log(message); |
|
|
|
iframe.contentWindow.postMessage(message, "*"); |
|
|
|
}, |
|
|
|
getAuthCameras(token){ |
|
|
|
var that=this; |
|
|
|
this.$axios.post("http://172.20.41.195:9001/video/api/getAuthCameras",null,{ |
|
|
|
this.$axios.post("http://172.20.41.195:9006/video/api/getAuthCameras",null,{ |
|
|
|
headers: { |
|
|
|
Authorization: token |
|
|
|
}}) |
|
|
|
.then((res) => { |
|
|
|
console.log(res); |
|
|
|
that.videoSrc="http://172.20.41.195:9025/video-play-plug?token="+that.token+"&playType=realPlay"+"&cameraCode="+res.data.data[0].code |
|
|
|
that.videoSrc="http://172.20.41.195:9015/video-play-plug?token="+that.token+"&playType=realPlay"+"&cameraCode="+res.data.data[0].code |
|
|
|
}); |
|
|
|
}, |
|
|
|
// |
|
|
|
getLogin(){ |
|
|
|
this.$axios |
|
|
|
.post("http://172.20.41.195:9007/video/api/login",this.userData) |
|
|
|
.post("http://172.20.41.195:9006/video/api/login",this.userData) |
|
|
|
.then((res) => { |
|
|
|
console.log(token); |
|
|
|
this.token=res.data.data.token; |
|
|
|
this.getAuthCameras(res.data.data.token); |
|
|
|
}); |
|
|
|