-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathdirectory_detail.html
235 lines (215 loc) · 9.61 KB
/
directory_detail.html
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
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<meta name="viewport" content="width=device-width, initial-scale=1.0, user-scalable=no">
<title>That's App H5</title>
<link rel="stylesheet" type="text/css" href="dist/css/app-bundle.css">
</head>
<body>
<div class="app-container directory_detail">
<div class="app-content">
<div class="img-container">
<!-- 轮播 -->
<div id='app-slider' class='swipe'>
<div class='swipe-wrap'>
<div><a href="#"><img class="app-lazyload" src="img/default.png" data-original="img/1.jpg"></a></div>
<div><img class="app-lazyload" src="img/default.png" data-original="img/2.jpg"></div>
<div><img class="app-lazyload" src="img/default.png" data-original="img/3.jpg"></div>
</div>
</div>
</div>
<div class="headline">
<h2>Shanghai Prefect Resturant</h2>
<div class="review-star">
<label>
<i class="icon-star"></i>
<i class="icon-star"></i>
<i class="icon-star"></i>
<i class="icon-star-o"></i>
<i class="icon-star-o"></i>
</label>
<a class="add-review" href="javascript:;">Add your review!</a>
</div>
</div>
<div class="info-list">
<table class="info-table">
<tbody>
<tr>
<td><i class="icon-home2"></i><span>Address</span></td>
<td><p>1116 Yan'an Xi Lu1116 </p></td>
</tr>
<tr>
<td class="taxi" colspan="2"><a class="taxi-printout" href="map_detail.html"><i class="icon-taxi"></i><span>地址 (Taxi printout)</span></a></td>
</tr>
<tr>
<td><i class="icon-location"></i><span>Region</span></td>
<td><p>Shanghai Pudong Century Park</p></td>
</tr>
<tr>
<td><i class="icon-bus"></i><span>Station</span></td>
<td><p>OCT , Line Luonao</p></td>
</tr>
<tr>
<td><i class="icon-mobile"></i><span>Phone</span></td>
<td><span class="phone">611342343243242342342342342342342342342343243840</span></td>
</tr>
</tbody>
</table>
</div>
<div class="content">
<p>
Boasting an international team with more than 15 years’ experience, LE SALON with a unique French style is the expert in hair color & blond highlights and international brand offering. Welcome to a unique experience dedicated to your hair and beaut<br>
<img class="app-lazyload" src="img/default.png" data-original="img/5.jpg">
<br>
Command-M Minimize the front window to the Dock. To minimize all windows of the front app, press Command-Option-M.
Command-N New: Open an new document or window.
Command-O Open the selected item, or open a dialog to select a file to open.
Command-P Print the current document.
Command-S Save the current document.
Command-W Close the front window. To close all windows of the app, press Command-Option-W.
Command-Q Quit the app.
</p>
<div class="tags">
<a href="#" type="button" class="btn btn-tag">Shanghai</a>
<a href="#" type="button" class="btn btn-tag">Hello</a>
<a href="#" type="button" class="btn btn-tag">Twitter</a>
<a href="#" type="button" class="btn btn-tag">Facebook</a>
<a href="#" type="button" class="btn btn-tag">Tecent</a>
<a href="#" type="button" class="btn btn-tag">Alibaba</a>
</div>
</div>
<div class="map">
<!-- 为了border样式,新加一个div -->
<div class="map-list" >
<h3>Map of Longemont Hotel</h3>
<div id="map-container">
</div>
</div>
</div>
</div>
<div class="app-footer">
<h2>EVENTS & PROMOTIONS</h2>
<div class="item">
<img class="app-lazyload" src="img/default.png" data-original="img/3.jpg">
<h3>LuYuan, China Miss World 2015, helloworld javascript</h3>
<p>
Command-P Print the current document.
Command-S Save the current document.
Command-W Close the front window. To close all windows of the app, press Command-Option-W.
Command-Q Quit the app.
</p>
</div>
<div class="item">
<!-- <img class="app-lazyload" src="img/default.png" data-original="img/6.jpg"> -->
<!-- background方法缩略图-->
<div class="thumbnail-img" style="background: url(img/6.jpg);width: 100%;height: 12rem;background-size: cover;background-position: center;"></div>
<h3>LuYuan, China Miss World 2015</h3>
<p>
Command-P Print the current document.
Command-S Save the current document.
Command-W Close the front window. To close all windows of the app, press Command-Option-W.
Command-Q Quit the app.
</p>
</div>
</div>
</div>
<script type="text/javascript" src="dist/js/zepto.min.js"></script>
<script type="text/javascript" src="dist/js/app-all.js"></script>
<script type="text/javascript" src="http://webapi.amap.com/maps?v=1.3&key=14b1ac87ce81e76c481b9ca09bfb8ae1&&plugin=AMap.Scale,AMap.OverView,AMap.ToolBar,Amap.Geolocation">
</script>
<script type="text/javascript">
// 图片懒加载
$('.app-lazyload').picLazyLoad();
// 轮播
var elem = document.getElementById('app-slider');
window.mySwipe = Swipe(elem, {
// startSlide: 4,
// auto: 3000,
continuous: false,
// disableScroll: true, //当滚动滚动条时是否停止幻灯片滚动
// stopPropagation: true, //是否停止事件冒泡
callback: function(index, element) { //幻灯片运行中的回调函数
getCurrentDot(index);
},
// transitionEnd: function(index, element) {} //动画运行结束的回调函数
});
// 页面加载后ajax调用如下方法
// comments(10,url)
Zepto(function($){
// 高德地图
var map = new AMap.Map('map-container', {
resizeEnable: true,
map:map,
zoom: 13
});
var toolBar = new AMap.ToolBar({
visible: true
})
map.setLang("en");
map.addControl(toolBar);
// 通过经纬度获取位置点
var marker = new AMap.Marker();
marker.setMap(map);
// review弹出层
$(".add-review").on("click",function(){
// var html = $(".pop-form").html();
layer.open({
className: "pop-mjh",
title: "Please add your review",
content: '<div class="pop-form"><form action="review_detail.html" id="review-form" method="post"><table class="pop-table"><tr><td>Overall</td><td><a><i class="icon-star-o"></i></a><a><i class="icon-star-o"></i></a><a><i class="icon-star-o"></i></a><a><i class="icon-star-o"></i></a><a><i class="icon-star-o"></i></a> <input type="hidden" name="overall"></td></tr><tr><td>Quality</td><td><a><i class="icon-star-o"></i></a><a><i class="icon-star-o"></i></a><a><i class="icon-star-o"></i></a><a><i class="icon-star-o"></i></a><a><i class="icon-star-o"></i></a> <input type="hidden" name="quality"></td></tr><tr><td>Environment</td><td><a><i class="icon-star-o"></i></a><a><i class="icon-star-o"></i></a><a><i class="icon-star-o"></i></a><a><i class="icon-star-o"></i></a><a><i class="icon-star-o"></i></a> <input type="hidden" name="environment"></td></tr><tr><td>Value</td><td><a><i class="icon-star-o"></i></a><a><i class="icon-star-o"></i></a><a><i class="icon-star-o"></i></a><a><i class="icon-star-o"></i></a><a><i class="icon-star-o"></i></a> <input type="hidden" name="value"></td></tr><tr><td>Service</td><td><a><i class="icon-star-o"></i></a><a><i class="icon-star-o"></i></a><a><i class="icon-star-o"></i></a><a><i class="icon-star-o"></i></a><a><i class="icon-star-o"></i></a> <input type="hidden" name="service"></td></tr></table><div class="div-area"><p>Review Content</p><textarea rows="3" class="review-content" placeholder="Please enter your review"></textarea></div></form></div>',
anim: "up",
btn: ['Submit', 'Cancel'],
success: function(){
$(".pop-table tr").each(function(index){
$(this).find("td > a").tap(function(){
$(this).find('i').removeClass("icon-star-o"); //未选中星星样式
$(this).find('i').addClass("icon-star"); //选中星星
$(this).prevAll().find('i').removeClass("icon-star-o");
$(this).prevAll().find('i').addClass("icon-star");
$(this).nextAll().find('i').removeClass("icon-star");
$(this).nextAll().find('i').addClass("icon-star-o");
})
})
},
yes: function(index){ /************ 这里处理ajax请求/或直接form提交 ***************/
// 获取各评分项的星星等级
var overall = $("input[name='overall']").parent().find('.icon-star').length;
var quality = $("input[name='quality']").parent().find('.icon-star').length;
var environment = $("input[name='environment']").parent().find('.icon-star').length;
var value = $("input[name='value']").parent().find('.icon-star').length;
var service = $("input[name='service']").parent().find('.icon-star').length;
// 获取评论comments
var review_content = $(".review-content").val();
if(overall && quality && environment && value && service){
$("#review-form").submit();
}else{
$(".pop-mjh h3").css("color","#fc4103");
}
/** ajax提交 **/
// $.ajax({
// type: 'post',
// url: '',
// data: {overall:overall,quality:quality,environment:environment,value:value,service:service},
// complete: function(){
// layer.open({
// type: 2
// ,content: 'Loading'
// ,shadeClose: false //是否点击遮罩关闭
// });
// },
// success: function(data){
// if(data === "success"){
// layer.closeAll();
// }
// }
// })
/** form提交 **/
// $("#review-form").submit();
},
});
});
});
</script>
</body>
</html>