<template>
	<view>
		<view id="box">
			<web-view :src="link"></web-view>
		</view>
	</view>
</template>

<script>
	import base64 from "@/library/vendor/base64.js";
	export default {
		data() {
			return {
				link: "",
				title : ""
			}
		},//encodeURIComponent
		onLoad(options) {
			var type = options.type || "";
			if(type == "base64") {
				this.link = base64.decode(decodeURIComponent(options.url));
			} else {
				this.link = decodeURIComponent(options.url);
			}
			//#// #ifdef H5
			if(type == "base64") {
				uni.switchTab({
					url:"/pages/index/index"
				});
				location.href = this.link;
				return;
			}
			// #endif
			
			
			this.title = options.title;
			uni.setNavigationBarTitle({
				title:options.title
			})
		},
		methods: {

		}
	}
</script>

<style>
	#box {
		padding-top: 90px;
		z-index: -1;
	}
</style>
