<template>
	<view>
		<z-nav-bar title="文章详情"></z-nav-bar>		
		<web-view :webview-styles="webviewStyles" :src="surl"></web-view>
	</view>
</template>

<script>
	import { mapState } from 'vuex';	
	export default {
		data() {
			return {
				surl:'',				
				webviewStyles: {
					progress: {
						color: '#55aaff'
					}
				},
				
			};
		},
		//第一次加载
		onLoad(e) {
			// 隐藏原生的tabbar
			uni.hideTabBar();
			this.surl = e.url
			console.log(e, '------')
			// #ifdef APP-PLUS
			 const pages = getCurrentPages()
			 const page = pages[pages.length - 1];
			 const currentWebview = page.$getAppWebview()
			 currentWebview.setStyle({
			 	titleNView: {
			 		buttons: [{
			 			float: 'right',
			 			type: 'close',
			 			onclick: function() {				
							uni.navigateBack({
								delta: 1
							});				
			 			}
			 		}]
			 	}
			 })
			// #endif
		},
		computed: {
			...mapState(['userInfo'])
		},
		//页面显示
		onShow() {
			// 隐藏原生的tabbar
			uni.hideTabBar();
		},
		onPullDownRefresh() {
			uni.stopPullDownRefresh()
		},
		//方法
		methods: {			
			
		},
	};
</script>
<style lang="scss" scoped>
	.box {
		background-color: #fff;
		min-height: calc(100vh - 270rpx);
	}
	.title{font-size: 32rpx; font-weight: bold; display: block; text-align: center;}
	.content { font-size: 26rpx; line-height: 48rpx; margin-top: 10rpx;}
</style>