<template>
	<view class="wvzone">
		<web-view :src="url"></web-view>
		<view class="wvtips">文件下载成功，即将返回.....,{{jst}}</view>
	</view>
</template>

<script>
	export default {
		data() {
			return {
				url:"",
				jst:10,
			}
		},
		onLoad(item) {
			console.log(item)
			this.url = item.url
		},
		mounted() {
			this.startCountdown()
		},
		methods:{
			  startCountdown() {
				this.jst = 20;  // 设置倒计时初始值
				const timer = setInterval(() => {
				  if (this.jst > 0) {
					this.jst--;  // 每秒减1
				  } else {
					clearInterval(timer);  // 倒计时结束，清除定时器
					//
					uni.navigateBack();
				  }
				}, 1000);
			  },
			
			//
			govak(){
			  let ms  = this.jst*1000
			  if(ms<60*1000){
				  
			  }
			  let st = setTimeout(function() {
				// https://pelerin.cn/planet
				uni.navigateBack()
			  }, ms);
			  
			  st.close
			  
			}
		}
	}
</script>

<style lang="scss" scoped>
.wvzone{
	.wvtips{
		text-align: center;
		font-size: 26rpx;
	}
}
</style>
