<template>
	<div class="lookVideo">
		<m-header v-if="headerStatus" />
		<video class="video" controls="controls" type="video/mp4" preload="auto" :src="videoUrl"></video>
	</div>
</template>
<script>
	import MHeader from "@/components/MHeader";
	import { browser } from '@/utils/common'
	export default {
		name: "lookVideo",
		components: {
            MHeader
		},
		data() {
            let query = this.$route.query
			return {
				headerStatus: false,
                videoUrl: decodeURIComponent(query.url)
			};
		},
		mounted() {
			let params = this.$route.query
			if(params.Authorization) {
				localStorage.setItem('Authorization', decodeURI(params.Authorization))
			}
			// 判断是否在app里面
			if(!browser().android && !browser().iPhone) {
				this.headerStatus = true
			} else {
				document.title = '考级回看'
			}
		}
	};
</script>
<style lang="less" scoped>
	@import url("../../assets/commonLess/variable");
	.lookVideo {
        min-height: 100vh;
        background-color: #fff;
        overflow-x: hidden;
        overflow-y: auto;
	}
    .video {
        width: 100%;
		height: 2rem;
		background: #f6f6f6;
    }
</style>
