<template>
	<view class="role-container">
		<view class="wrap">
			<!-- <view class="video-wrapper" id="video-container"></view> -->
			<view class="secbar"> <span class="back" @click="back()"></span></view>
			<view class="mainwrap3">
				<view class="role_wrap"><sVideo :jsonId="jsonId"></sVideo></view>
			</view>
		</view>
	</view>
</template>

<script>
	import sVideo from "@/components/s-video/s-video.vue";
	export default {

		data() {
			return {
				page: "",
				jsonId: "",
				roleId:"",
			};
		},
		onLoad(options) {
			this.jsonId = options.roleId
		},
		onReady() {
			this.QR();
		},
		methods: {
			QR() {
				// uni.scanCode({
				// 	onlyFromCamera: true,
				// 	success: (res) => {
				// 		console.log('扫描二维码成功,结果:' + res.result);
				// 	},
				// 	error: (res) => {
				// 		console.log('扫描二维码出现错误')
				// 	}
				// })
			},
			back(){
				uni.navigateBack({
					delta:1,//返回层数，2则上上页
				})
			},
		},
		components: {
			sVideo
		}
	}
</script>

<style lang="scss">

@import url("@/static/base_css.css");	
.role-container {
	width: 100%;
	height: 100%;	
}

.secbar {
    top: 0;
    z-index: 1;
}

.secbar ._span.back {
    top: 50px;
}

.mainwrap3 {
	top: 0;
	height: calc(100% - 70px);
	overflow: hidden;
}

.role_wrap {
	position: absolute;
	top: 5%;
	margin: 0;
	width: 100%;
}
</style>