<template>
	<web-view :src="src"></web-view>
</template>

<script>
	import {getVideoInfo} from '@/api/system.js'	
	export default {
		data() {
			return {
				src:'',
				title:"",
				h5:'https://hchzhhnm.xarbkj.net/camera/index.html'
			}
		},
		onLoad({id,title}) {
			this.showCamera(id)	
			this.title=title
			uni.setNavigationBarTitle({
				title:title||'loading……'
			})
		},
		methods: {
			showCamera(cameraId){
				getVideoInfo(cameraId).then((res)=>{
					let cameraHttp=res.data.cameraHttp;
					this.src=`${this.h5}?href=${cameraHttp}&title=${this.title}`
				})
			},
		}
	}
</script>

<style>

</style>
