<template>
	<view class="content">
		<image :src="msg.riskLevel=='2'?'../../static/icon/hong.png':'../../static/icon/lv.png'" mode=""></image>
		<view class="text">
			<view class="gg">
				公共卫生行程卡
			</view>
			<view class="yqfk">
				疫情防控，人人有责
			</view>
		</view>
		<view class="footer">
			<view class="context">
				<view :class="msg.riskLevel=='2'?'titles':'titlel'">
					当前通勤状态为{{msg.riskLevel=='2'?'红色':'绿色'}}
				</view>
				<view class="offName">{{msg.companyName}}</view>
				<view class="userName">{{msg.zw}}<text>{{msg.name}}</text>的动态行程卡</view>
				<view class="gxtime">
					更新于：{{msg.createTime}}
				</view>
				<image src="../../static/icon/85d9da2fe93c10c8c49b930b2c91be1.png" mode=""></image>
			</view>
			<view class="foot">
				感谢您的支持并经同意<text>《用户协议》</text>和<text>《隐私权政策》</text>
			</view>
		</view>
	</view>
</template>

<script>
	import {
		postRequest,
		getRequest
	} from '../../api/api.js'
	export default {
		data() {
			return {
				msg:{}
			}
		},
		onBackPress(e){
		//正常返回页面
		  uni.navigateTo({
		    url:"/pages/sy/sy"
		  })
		  return true;
		},
		onLoad:function(option) {
			getRequest('/loginVerify/findDailyRegister',{}).then(res=>{
				if(res.code=='200'){
					this.msg=res.data
				}
			});
		},
		mounted: () => {
			let userType=uni.getStorageSync('userType')
			if(userType<=6){
				document.querySelector('.uni-page-head-hd').style.display = 'none'
			}
		},
		methods: {
			getQueryString(name)  {
			    const reg = new RegExp('(^|&)' + name + '=([^&]*)(&|$)', 'i');
			    const search = window.location.search.split('?')[1] || '';
			    const r = search.match(reg) || [];
			    return r[2];
			   }
		}
	}
</script>

<style>
page{
	height: 100%;
}
/* #ifdef H5 */
 /* 页面A */
 uni-page[data-page="pages/A/A"] .uni-page-head-hd {
	display: none;
 }
 /* #endif */
.content{
	height: 100%;
}
.content image{
	width: 100%;
	height: 87%;
	position: relative;
}
.text{
	position: absolute;
	top: 10%;
	left: 0;
	width: 100%;
}
.text .gg{
	margin: 0 auto;
	text-align: center;
	color: white;
	font-size: 30px;
	font-family: 楷体;
	font-weight: bold;
	margin-bottom: 10px;
}
.text .yqfk{
	margin: 0 auto;
	text-align: center;
	color: white;
}
.footer{
	position: fixed;
	left: 0;
	bottom: 0;
	width: 100%;
	height: 45%;
	text-align: center;
}
.footer .context{
	margin: 0 20px;
	background-color: white;
	box-shadow: 0px 0px 15px 3px rgba(0, 0, 0, 0.1);
	border-radius: 10px 10px 0  0 ;
	height: 87%;
	position: relative;
}
.footer .context .titles{
	padding: 10px 0;
	background-color: rgba(226,75,75,0.3);
	color: #a00606;
	font-weight: bold;
}
.footer .context .titlel{
	padding: 10px 0;
	background-color: rgba(75,226,114,0.3);
	color: #37a244;
	font-weight: bold;
}
.footer .context .titlec{
	padding: 10px 0;
	background-color: rgba(234,112,7,0.3);
	color: #924809;
	font-weight: bold;
}
.context image{
	position: absolute;
	left: -3%;
	bottom: 0;
	width: 42%;
	height: 49%;
}
.offName{
	padding: 10px 0 0 0;
}
.userName{
	padding: 5px 0;
}
.userName text{
	font-weight: bold;
}
.gxtime{
	font-size: 12px;
	color: #CCCCCC;
}
.tujing{
	font-size: 12px;
	color: #CCCCCC;
	width: 55%;
	margin-left: 44%;
	margin-top: 10%;
}
.tujing text{
	color: #d20c0c;
	white-space: nowrap;     
	overflow: hidden;         
	text-overflow: ellipsis;
}
.footer .foot{
	position: fixed;
	left: 0;
	bottom: 0;
	width: 100%;
	font-size: 23rpx;
	padding: 20rpx 0;
	box-shadow: 0px 0px 15px 3px rgba(0, 0, 0, 0.1);
}
.footer .foot text{
	color: red;
}
</style>
