school.html
10.1 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
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
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
<!doctype html>
<html>
<head>
<meta charset="utf-8">
<meta name="format-detection" content="telephone=no">
<meta name="viewport" content="width=device-width, initial-scale=1.0, minimum-scale=1.0, maximum-scale=1.0,user-scalable=no">
<meta name="apple-mobile-web-app-capable" content="yes">
<meta name="apple-mobile-web-app-status-bar-style" content="black">
<title>绍兴市教育局教育满意度调查</title>
<link href="../assets/reset.css" rel="stylesheet"/>
<link href="../assets/style.css" rel="stylesheet"/>
<script src="../assets/jquery-1.8.3.min.js"></script>
<style>
html{ width:100%; overflow-x:hidden;}
.footer{ margin-top:70px; padding:10px 0;}
.footer.absolute-bottom{ margin-top:0;}
</style>
<link href="../assets/select2/select2.min.css" rel="stylesheet" />
<style>
.select2-container{ margin-bottom:15px;}
.select2-results__option{ padding:12px 6px;}
.select2-results__option:hover{ background:#eee;}
.select2-container--default .select2-search--dropdown .select2-search__field{ -webkit-appearance:none; border:1px solid #ddd; border-radius:2px; padding:8px 4px; font-size:14px;}
.select2-container--open .select2-dropdown--above{ border-bottom:1px solid #ccc; box-shadow:0 -2px 3px rgba(0,0,0,.2)}
.select2-container--open .select2-dropdown--below{ border-top:1px solid #ccc; box-shadow:0 2px 3px rgba(0,0,0,.2)}
.select2-container--default .select2-selection--single{ border:0; height:40px;}
.select2-container--default .select2-selection--single .select2-selection__rendered{ line-height:40px;}
.select2-container--default .select2-selection--single .select2-selection__arrow{ height:40px;}
.select2-dropdown{ border:0; background:rgba(255,255,255,.9)}
.header{ position:absolute;}
.tips{ display:none; position:absolute; min-width:50px; max-width:200px; min-height:20px; line-height:20px; padding:8px 10px; background:rgba(255,0,0,.9); color:#fff; border-radius:5px; top:100px; left:50px; z-index:100;}
.tips:before{ content:""; border:6px solid Transparent; border-bottom-color:rgba(255,0,0,.9); position:absolute; top:-12px; left:10px;}
.tips .fa{ margin-right:5px;}
</style>
<script src="../assets/select2/select2.min.js"></script>
<script src="../assets/select2/i18n/zh-CN.js"></script>
<script>
$(function(){
});
</script>
</head>
<body class="bodybg">
<header class="header">
<a class="back" onClick="history.back()"></a>
<div class="mid">绍兴市教育局教育满意度调查</div>
</header>
<section class="h-header"></section>
<section class="tips"></section>
<section class="school-wrap">
<div class="swiper-container">
<div class="swiper-wrapper">
<div class="swiper-slide slide-0">
<article class="circle">
<div class="form">
<h3 class="form-t"><i class="fa fa-user-plus"></i>选择身份</h3>
<a class="a-student">我是 学生家长</a>
<a class="a-people">我是 热心市民</a>
</div>
</article>
<section class="footer">
<img src="../images/copyright.gif" /> 杭州顺治科技股份有限公司
<br />客服热线:<a>400-826-2468</a>
</section>
</div>
<div class="swiper-slide slide-1">
<article class="circle">
<div class="form">
<h3 class="form-t"><i class="fa fa-mobile-phone"></i>验证手机号码
</h3>
<input class="input-1 input-phone" id="mobile" type="tel" placeholder="手机号码"/>
<div class="verbox clearfix">
<input class="input-1" id="ver" placeholder="4位验证码" type="tel"/>
<span class="btn-send">获取验证码</span>
</div>
<input class="input-submit" type="button" value="下一步" onClick="return check1()"/>
</div>
</article>
<section class="footer">
<img src="../images/copyright.gif"/> 杭州顺治科技股份有限公司
<br/>客服热线:<a>400-826-2468</a>
</section>
</div>
<div class="swiper-slide slide-2">
<article class="circle">
<div class="form">
<select id="select1">
<option>高中</option>
<option>初中</option>
<option>小学</option>
</select>
<select id="select1">
<option>绍兴市第一中学</option>
<option>绍兴市第一中学</option>
<option>绍兴市第一中学</option>
<option>绍兴市第一中学</option>
</select>
<input class="input-1 input-phone" id="mobile1" type="tel" placeholder="手机号码"/>
<input class="input-1 input-name" type="text" placeholder="姓名(选填)"/>
<input class="input-submit" type="button" value="开始答题" onclick="return check2();" />
</div>
</article>
<section class="footer">
<img src="images/copyright.gif"/> 杭州顺治科技股份有限公司
<br/>客服热线:<a>400-826-2468</a>
</section>
</div>
</div>
</div>
</section>
<!--swiper-->
<link href="../assets/swiper/swiper.min.css" rel="stylesheet"/>
<script src="../assets/swiper/swiper.min.js"></script>
<script>
var swiper;
$(function(){
var $swiperContainer=$('.swiper-container');
var $swiperSlide=$('.swiper-container .swiper-slide');
swiper = new Swiper('.swiper-container',{
allowSwipeToPrev:false,
allowSwipeToNext:false,
speed:500
});
})
</script>
<!--swiper End-->
<script>
var winHeight = $(window).height();
var winWidth = $(window).width();
$(function(){
var bodyWidth = $('body').width();
//footer
if (winHeight <= 480||winHeight<=winWidth* 1.5) {
$('.footer').addClass('absolute-bottom');
};
//点击获取验证码
$('.btn-send').on('touchend',function(){
//判断是否填入手机
var mobile = $('#mobile').val();
if (!mobile) {
showTips($('#mobile'), '请填入手机号', 'error');
return false;
} else {
var reg = /^0?1[3|4|5|7|8][0-9]\d{8}$/;
if (!reg.test(mobile)) {
showTips($('#mobile'), '手机号码填写有误', 'error');
return false;
}
}
//发送验证码
var $this=$(this);
if(!$this.hasClass('hasSend')){
$this.addClass('hasSend').text('60s');
var _tick=60;
var _tickFn=setInterval(function(){
_tick--;
$this.text(_tick+'s');
if(_tick==0){
clearInterval(_tickFn);
setTimeout(function(){
$this.removeClass('hasSend').text('发送验证码');
},1000);
}
},1000);
}
});
//选择身份
//点击学生家长
$('.slide-0 .a-student').on('click',function(){
swiper.slideNext();
});
//点击热心市民
$('.slide-0 .a-people').on('click',function(){
swiper.slideTo(2);
$('.slide-2 .select-grade').hide();
});
//切换
var $school=$('.select-school');
$('.select-grade').change(function(){
if($(this).val()==1){
$school.html('<option>鲁迅幼托中心</option><option>鉴湖新村幼儿园</option><option>市机关幼儿园</option>');
$school.show();
}
if($(this).val()==2){
$school.html('<option>鲁迅小学人民路校区</option><option>鲁迅小学和畅堂校区</option><option>培新小学</option><option>快阁苑小学</option><option>文理学院附属小学</option>');
$school.show();
}
if($(this).val()==3){
showTips($(this), '该学区无对应初中学校,请选择其他学区', 'error');
$school.hide();
}
})
});
//发送完验证码后,点击下一步
function check1(){
//判断是否填入手机
var mobile = $('#mobile').val();
if (!mobile) {
showTips($('#mobile'), '请填入手机号', 'error');
return false;
}
//判断是否填入验证码
var ver=$('#ver').val();
if (!ver) {
showTips($('#ver'), '请填入验证码', 'error');
return false;
}
/*
*需检查验证码
*/
swiper.slideNext();
}
//点击 开始答题
function check2(){
/*var name=$('#name').val();
if (!name) {
showTips($('#name'), '请填入您的姓名', 'error');
return false;
}*/
location.href="question.html";
}
/*表单提示*/
var $tips=$('.tips');
var tipsLeft,tipsTop;//表单错误提示位置
function showTips(e,text,status,duration){
tipsLeft=e.offset().left;
tipsTop=e.offset().top+46;
var backgroundColor;
if(status=="error"){
$('.checkerror').removeClass('checkerror');
if(e.is('select')){
e.next().find('.select2-selection').addClass('checkerror');
}else{
e.addClass('checkerror');
}
}
backgroundColor="rgba(255,0,0,.9)";
$tips.html('<i class="fa fa-exclamation-circle"></i>'+text).css({'background-color':backgroundColor,'left':tipsLeft,'top':tipsTop}).fadeIn(300);
$('body').animate({'scrollTop':tipsTop-100},500);
hideTips(duration);
//改变后如果有值,则隐藏tips
e.change(function(){
if(e.val()){
if(e.val()==3&&e.hasClass('select-grade')){
}else{
hideTips(0);
}
}
})
}
/*隐藏表单提示--usage:
*一直存在: hideTips();
*马上隐藏: hideTips(0);
*2秒后隐藏: hideTips(2000);
*/
function hideTips(duration){
if(typeof(duration)!="undefined"){
//如果有持续时间,则在duration后隐藏
setTimeout(function(){
$tips.fadeOut(300);
$('.checkerror').removeClass('checkerror');
},duration);
}
}
</script>
</body>
</html>