<template>
	<view class="hasAuno">
		当前是游客权限 请登录查看更多
		<button @click="toLogin">立即登录</button>
		<applet-mask v-if="appletMaskFlag" @closeMask='closeMask'></applet-mask>
	</view>
</template>

<script>
	export default {
		name:"nopermission",
		data() {
			return {
				appletMaskFlag:false
			};
		},
		methods:{
			closeMask(){
				this.appletMaskFlag = false
			},
			toLogin(){
				var sUserAgent = navigator.userAgent.toLowerCase();
				if(sUserAgent.indexOf("baidu") > 0 || sUserAgent.indexOf("ucbrowser") > 0 ) {
					this.appletMaskFlag = true;
				}else{
					if (!navigator.userAgent.toLowerCase().match(/micromessenger/i)) {
					   location.href = 'weixin://dl/business/?t=o3aIVwrmPmt'
					}else{
						this.appletMaskFlag = true;
					}
				}
				_hmt?_hmt.push(['_trackEvent','移动端h5', '视频号冷启动', uni.getStorageSync('key'),'']):'';
			}
		}
	}
</script>

<style>
.hasAuno{
	margin-bottom: 40rpx;
	position: relative;
	padding: 80rpx 0 120rpx;
	text-align: center;
}
.hasAuno button{
	display: block;
	margin: 40rpx auto;
	width: 260rpx;
	height: 70rpx;
	background: #2662ff;
	color: #fff;
	font-size: 28rpx;
	line-height: 70rpx;
	border-radius: 40rpx;
	border: none;
}
</style>
