<template>
	<view v-if="show">
		<!-- logo区域 -->
		<view class="logoWrap">
			<image src="../../static/image/logo_txt.png" mode=""></image>
		</view>
		<!-- 标题区域 -->
		<!-- <view class="titleWrap">
			生态环境监管
		</view> -->
		<!-- 底部区域 -->
		<view class="bottomWrap"></view>
	</view>
</template>

<script>
	export default{
		data(){
			return{
				show:false
			}
		},
		created() {
		  // 从本地缓存中同步获取指定 key 对应的内容,用于判断是否是第一次打开应用
		  const value = uni.getStorageSync('launchFlag');
		  if (value) {
		    // 如何已经有,直接去home首页
			this.$href('/pages/login/login')
		  } else {
			  this.show = true
		    // 没有值,跳到引导页,并存储,下次打开就不会进去引导页
		    uni.setStorage({
		      key: 'launchFlag',
		      data: true
		    });
			setTimeout(()=>{
				this.$href('/pages/login/login')
			},2000)
		  }
		}
	}
</script>

<style>
	page{background: #4bb377;}
	/* logo区域 */
	.logoWrap{padding-top: 376rpx;display: flex;justify-content: center;}
	.logoWrap image{width: 504rpx;height: 140rpx;}
	/* 标题区域 */
	.titleWrap{padding-top: 36rpx;font-size: 40rpx;color: #fff;text-align: center;}
	/* 底部区域 */
	.bottomWrap{position: fixed;bottom: 0;background: url(../../static/image/img_1.png) no-repeat;background-size: 100% 168rpx;z-index: 1;width: 100%;height: 168rpx;}
</style>