|
|
@@ -122,7 +122,6 @@
|
|
|
</template>
|
|
|
|
|
|
<script>
|
|
|
- import falsificationdata from '../../FalsificationData.js'
|
|
|
export default {
|
|
|
name: 'app',
|
|
|
components: {},
|
|
|
@@ -191,12 +190,9 @@
|
|
|
method: 'get',
|
|
|
url: this.$global.genApiUrl('/api/devices')
|
|
|
}).then(function(res) {
|
|
|
- if (res.data.code == 0) {
|
|
|
- that.deviceList = res.data;
|
|
|
- }
|
|
|
+ that.deviceList = res.data;
|
|
|
}).catch(function(error) {
|
|
|
console.log("请求失败,使用假数据");
|
|
|
- that.deviceList = falsificationdata.devices;
|
|
|
});
|
|
|
},
|
|
|
showVideoInfo: function(videoData) {
|
|
|
@@ -361,10 +357,10 @@
|
|
|
///api/devices/{deviceId}/sync
|
|
|
console.log("刷新对应设备:" + itemData.deviceId);
|
|
|
this.$axios({
|
|
|
- method: 'get',
|
|
|
- url: '/api/devices/' + itemData.deviceId + '/sync'
|
|
|
+ method: 'post',
|
|
|
+ url: this.$global.genGb28181Url('/api/devices/' + itemData.deviceId + '/sync')
|
|
|
}).then(function(res) {
|
|
|
-
|
|
|
+ // console.log("刷新设备结果:"+JSON.stringify(res));
|
|
|
});
|
|
|
},
|
|
|
//通知设备上传媒体流
|
|
|
@@ -372,12 +368,11 @@
|
|
|
///api/play/{deviceId}/{channelId}
|
|
|
let deviceId=this.currentDevice.deviceId;
|
|
|
let channelId=itemData.channelId;
|
|
|
- console.log("通知设备推流:"+deviceId+" : "+channelId);
|
|
|
+ console.log("通知设备推流1:"+deviceId+" : "+channelId);
|
|
|
this.$axios({
|
|
|
method: 'get',
|
|
|
- url: '/api/play/'+deviceId+'/'+channelId
|
|
|
+ url: this.$global.genGb28181Url('/api/play/'+deviceId+'/'+channelId)
|
|
|
}).then(function(res) {
|
|
|
-
|
|
|
});
|
|
|
}
|
|
|
|