qinyou.html
5.7 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
<!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>