<!DOCTYPE html>
<html>

	<head>
		<meta charset="utf-8">
		<title>Hello MUI</title>
		<meta name="viewport" content="width=device-width, initial-scale=1,maximum-scale=1,user-scalable=no">
		<meta name="apple-mobile-web-app-capable" content="yes">
		<meta name="apple-mobile-web-app-status-bar-style" content="black">

		<link rel="stylesheet" href="../../css/mui.min.css">
		<style>
			html,
			body {
				background-color: #efeff4;
			}
			
			.title {
				margin: 20px 15px 10px;
				color: #6d6d72;
				font-size: 15px;
			}
			
			.oa-contact-cell.mui-table .mui-table-cell {
				padding: 11px 0;
				vertical-align: middle;
			}
			
			.oa-contact-cell {
				position: relative;
				margin: -11px 0;
			}
			
			.oa-contact-avatar {
				width: 75px;
			}
			
			.oa-contact-avatar img {
				border-radius: 50%;
			}
			
			.oa-contact-content {
				width: 100%;
			}
			
			.oa-contact-name {
				margin-right: 20px;
			}
			
			.oa-contact-name,
			oa-contact-position {
				float: left;
			}
		</style>
	</head>

	<body>
		<div class="mui-content">
			<div class="title">
				血压检测记录
			</div>

			<ul id="content" class="mui-table-view mui-table-view-striped mui-table-view-condensed">
			</ul>
		</div>
	</body>
	<script id='temp' type="text/html">
		<li class="mui-table-view-cell">
			<div class="mui-slider-cell">
				<div class="oa-contact-cell mui-table">
					<div class="oa-contact-content mui-table-cell">
						<div class="mui-clearfix">
							<h4 class="oa-contact-name" style="float:none;">分数:<%=(data.score)%></h4>
							<div>
								<p style="color:green;">收缩压(mmHg)：
									<%=(data.syspressure)%> 舒张压(mmHg)：
										<%=(data.diapressure)%>
								</p>
								<p style="color:green;">心率(次/分钟)：
									<%=(data.pluse)%>
								</p>
							</div>
						</div>
						<p class="oa-contact-email mui-h6" style="text-align: right;">
							<%=(data.testtime)%>
						</p>
					</div>
				</div>
			</div>
		</li>
	</script>
	<script id='temp2' type="text/html">
		<li class="mui-table-view-cell">
			<div class="mui-slider-cell">
				<div class="oa-contact-cell mui-table">
					<div class="oa-contact-content mui-table-cell">
						<div class="mui-clearfix">
							<h4 class="oa-contact-name">暂无记录</h4>
						</div>
					</div>
				</div>
			</div>
		</li>
	</script>
	<script src="../../libs/choujiang/js/jquery.min.js" type="text/javascript" charset="utf-8"></script>
	<script src="http://121.42.151.57:7999/service/dyyj/demo.js/helper.js" type="text/javascript" charset="utf-8"></script>
	<script src="../../js/service.js" type="text/javascript" charset="utf-8"></script>
	<script src="../../js/mui.min.js"></script>
	<script src="../../js/arttmpl.js" type="text/javascript" charset="utf-8"></script>
	<script>
		var DyyjDemo = new DyyjDemo('/service/dyyj/demo.js');
		mui.init({
			swipeBack: true //启用右滑关闭功能
		});
		mui.plusReady(function() {
			var temp = document.getElementById("temp").innerText;
			var htmlStr = '';
			var userId = getUserId();
			DyyjDemo.xueYaHistory(userId, function(result) {
				if (result.rs) {
					var data = result.ms;
					for (var i = 0; i < data.length; i++) {
						var e = data[i];
						htmlStr += template('temp', {
							data: e
						});
					}
				} else {
					htmlStr = document.getElementById("temp2");
				}
				document.getElementById("content").innerHTML = htmlStr;
			});
		});
	</script>

</html>