作者 wendy0406

亲友档案

正在显示 1 个修改的文件 包含 155 行增加0 行删除
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta name="viewport" content="width=device-width,initial-scale=1,maximum-scale=1,minimum-scale=1,user-scalable=no">
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<link rel="stylesheet" type="text/css" href="css/base.css" />
<link rel="stylesheet" type="text/css" href="css/style.css" />
<link rel="stylesheet" href="css/swiper.min.css">
<script type="text/javascript" src="js/base.js"/>
<script src="js/base.js" type="text/javascript" charset="utf-8"></script>
<title>健康档案</title>
<style>
.agheader {
background: rgba(255, 255, 255, .8);
}
.body {
background: none;
position: fixed;
top: 0;
width: 100%;
height: 100%;
background-image: url(images/health2_02.jpg);
background-size: 100% 100%;
}
.he2part{
background-image: none;
height:100%;
}
.he2part .swiper-container{
margin-top: 2rem;
}
.he2kuang,.he3kuang,.he4kuang{
/* width:4.77rem; */
height:6.04rem;
background-size: 100% 100%;
margin-top: 0;
}
.dangtit{
margin-top: 1.5rem;
}
.dangdesc{
margin-bottom: 1.2rem;
}
.dangreport{
margin-bottom: 0.3rem;
}
.swiper-slide {
width: 3.5rem !important;
border-radius: 10px;
margin-right: 1rem;
}
</style>
</head>
<body>
<div class="body">
<div class="agheader center">
<div class="left seback">
<a href="#" onClick="javascript:history.back(-1);">
<img src="images/care_03.jpg" />
</a>
</div>
<div class="headertext">健康档案</div>
</div>
<div class="he2part center">
<div class="swiper-container">
<div class="swiper-wrapper" id="familyRecord">
</div>
</div>
<div style="color:#424242;margin-top:1.5rem;">
<< 左右滑动浏览>></div>
</div>
</div>
</body>
<!-- Swiper JS -->
<script src="js/swiper.min.js"></script>
<script type="text/javascript" src="js/common.js"/>
<script src="http://res.wx.qq.com/open/js/jweixin-1.2.0.js"></script>
<script type="text/javascript" src="js/jquery.min.js"></script>
<!-- Initialize Swiper -->
<script>
window.onload = function () {
var swiper = new Swiper('.swiper-container', {
slidesPerView: 3,
spaceBetween: 30,
centeredSlides: true,
pagination: {
el: '.swiper-pagination',
clickable: true,
},
});
familyRecord()
}
function familyRecord() {
$.ajax({
type:"POST",
url: baseUrl+"user/index/familyRecord",
dataType:"json",
headers:{
"XX-Device-Type":"1",
"XX-Token":"1",
},
success:function (res) {
$('#familyRecord').html(``)
var data = res.data;
var info = data.info
console.log(info[0].time)
for ( key in info) {
var img = key%3 == '0'?'images/hebg2_03.png':key%3 == '1'?'images/he2_03.png':key%3 == '2'?'images/hebg2_04.png':""
console.log(img)
$('#familyRecord').append(`<div class="swiper-slide" id="" data-id = ${parseInt(key)+1}>
<div class="he2kuang" style="background-image:url(${img})">
<div class="dangall">
<span>${parseInt(key)+1}</span>/${info.length}</div>
<div class="dangtit">${info[key].name}的健康档案</div>
<div class="dangdesc">最后更新时间:${info[key].time}</div>
<div class="dangreport">
<a href="#">
<img src="images/he2a_03.jpg" />服务报告(${info[key].service}份)</a>
</div>
<div class="dangreport">
<a href="#">
<img src="images/he2a_06.jpg" />检验报告(${info[key].checkout}份)</a>
</div>
</div>
</div>`)
}
// if ($('#swiper_item').attr('data-id')==1){
// $('#swiper_item').css('background-image',"url(../images/hebg2_03.png)")
// } else if ($('#swiper_item').attr('data-id')==2){
// $('#swiper_item').css('background-image',"url(../images/he2_03.png)")
// }else if ($('#swiper_item').attr('data-id')==3){
// $(this).css('background-image',"url(../images/hebg2_04.png)")
// }
}
})
}
</script>
</html>
\ No newline at end of file
... ...