<template>
	<view class="common_webview_page">
		<view class="page_content">
			<web-view :webview-styles="webviewStyles" :src="url"></web-view>
		</view>
	</view>
</template>

<script>
	export default {
		data() {
			return {
				url: "",	//外链链接
				webviewStyles: {
					progress: {
						color: '#FF3333'
					}
				}
			}
		},
		
		onReady() {
			// 读取缓存中的外链链接
			let webviewUrl = uni.getStorageSync('webview_url')
			
			this.url = webviewUrl ? webviewUrl : ''
			
			// 从本地缓存中同步移除指定 key
			uni.removeStorageSync('webview_url')
		}
	}
</script>

<style scoped>

</style>
