Commit 1123573d by Tianqing Liu

Merge branch 'qxh-master' of http://git.keliuyun.com:55676/jiaxiuc123/miniProject into qxh-master

2 parents 26e2d111 c001e402
......@@ -10,10 +10,10 @@ const tourApi = {
},
// 云控制
ptzStart(params,config) {
return req('PUT', `/patrol/through/ptzStart`, params, config)
return req('POST', `/patrol/through/ptzStart`, params, config)
},
ptzStop(params,config) {
return req('PUT', `/patrol/through/ptzStop`, params, config)
return req('POST', `/patrol/through/ptzStop`, params, config)
},
// 获取设备录像记录
getThroughVideoRecord(params, config){
......
......@@ -129,7 +129,20 @@ export default {
});
// this.params = obj
console.log(this.params)
//利用iframe的onload事件刷新页面
document.title = this.params.gateName||'视频详情'
var iframe = document.createElement('iframe');
iframe.style.visibility = 'hidden';
iframe.style.width = '1px';
iframe.style.height = '1px';
iframe.onload = function () {
setTimeout(function () {
document.body.removeChild(iframe);
}, 0);
};
document.body.appendChild(iframe);
this.params.ptzEnable = ''+this.params.ptzEnable
this.terminalType = this.params.terminalType
this.dateFormatType = this.terminalType == 'ios'||this.terminalType == 'mac' ? 'YYYY/MM/DD':'YYYY-MM-DD';
if(this.params.gateUnid) {
......@@ -152,6 +165,22 @@ export default {
getVideoAddress(startTime,stopTime) {
let par = {
gateUnid: this.params.gateUnid,
// appKey: this.params.appKey,
// playbackSpeed: 1,
startTime:startTime?startTime:null,
stopTime:stopTime?stopTime:null,
}
// 加密
// let parStr = this.aesEncrypt(par)
tourApi.getLiveAndPlaybackAddress(par).then(res => {
if (res.data&&res.data.code == 200) {
this.$refs.vionPlayer.play(res.data.msg);
} else {
Toast.fail('取流失败');
}
})
/* let par = {
gateUnid: this.params.gateUnid,
appKey: this.params.appKey,
playbackSpeed: 1,
startTime:startTime?startTime:null,
......@@ -162,8 +191,10 @@ export default {
tourApi.getThroughVideoUrl({param:parStr}).then(res => {
if (res.data&&res.data.code == 200) {
this.$refs.vionPlayer.play(res.data.msg);
} else {
Toast.fail('取流失败');
}
})
}) */
},
//加密
aesEncrypt (obj){
......
......@@ -31,7 +31,7 @@
</div>
<!-- 操作按钮 -->
<div class="operating-box">
<van-button v-if="isNoBack&&ptzEnable==1" type="info" size="mini" @click="ptzControlChange">{{ptzControlShow?'隐藏云台':'打开云台'}}</van-button>
<van-button v-if="isNoBack&&ptzEnable==='1'" type="info" size="mini" @click="ptzControlChange">{{ptzControlShow?'隐藏云台':'打开云台'}}</van-button>
<van-button v-else-if="!isNoBack" type="info" size="mini" @click="backRealTime">返回实时</van-button>
<!-- <div v-if="isNoBack" class="operating-btn" @click="ptzControlChange">{{ptzControlShow?'隐藏云台':'打开云台'}}</div> -->
<!-- <div v-else class="operating-btn" @click="backRealTime">返回实时</div> -->
......
......@@ -225,6 +225,11 @@ export default {
this.$refs.vionPlayer.play(res.data.msg);
}
// this.splitNumChange()
} else {
this.$message({
message: res.data.msg||'取流失败',
type: 'warning'
});
}
})
},
......
Markdown is supported
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!