<template>
	<view>
		<web-view :webview-styles="webviewStyles" :src="src"></web-view>
	</view>
</template>

<script>
	export default {
		data() {
			return {
				webviewStyles: {
					progress: {
						color: '#FF3333'
					}
				},
				src:''
			}
		},
		onLoad(e) {
			let that = this;
			let s = 0;
			let time = setInterval(() => {
				uni.getNetworkType({
					success: (res) => {
						console.log(res.networkType, s);
						if (res.networkType == 'none') {
							uni.showToast({
								icon: 'none',
								title: 'Please connect to the network',
								duration: 3000,
							})
						} else if (res.networkType !== 'none') {
							that.typee = 2;
							clearInterval(time);
							
						}
					}
				})
				s++;
			}, 1000);
			this.src = e.src
		},
		methods:{
			
		}
	}
</script>

<style>

</style>