<template>
	<view>
		<web-view :src="url"></web-view>
	</view>
</template>
<script>
	var wv; //计划创建的webview
	export default {
		data() {
			return {
				url: 'https://weathernew.pae.baidu.com/weathernew/pc?query=%E5%90%89%E6%9E%97%E9%95%BF%E6%98%A5%E5%A4%A9%E6%B0%94&srcid=4982'
			}
		},
		onLoad: async function(e) {
			const that = this;
			that.$set(that, `url`, e && e.url);
		},
		onReady() {
			// #ifdef APP-PLUS
			var currentWebview = this.$scope.$getAppWebview() //获取当前页面的webview对象
			setTimeout(function() {
				wv = currentWebview.children()[0]
				wv.setStyle({
					scalable: true
				})
			}, 1000); //如果是页面初始化调用时，需要延时一下
			// #endif
		}
	}
</script>