<template>
	<view>
		<web-view :src="url"></web-view>
	</view>
</template>
<script>
	var wv; //计划创建的webview
	export default {
		data() {
			return {
				url: 'https://www.tianqi.com/changchun/'
			}
		},
		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>