School.aspx
16.3 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
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
<%@ Page Language="C#" AutoEventWireup="true" CodeBehind="School.aspx.cs" Inherits="Quiz.WebSite.School" %>
<!DOCTYPE html>
<html xmlns="http://www.w3.org/1999/xhtml">
<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="http://vote.on168.com.cn/jindu/assets/reset.css" rel="stylesheet"/>
<link href="http://vote.on168.com.cn/jindu/assets/style.css" rel="stylesheet"/>
<script src="http://vote.on168.com.cn/jindu/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="http://vote.on168.com.cn/jindu/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="http://vote.on168.com.cn/jindu/assets/select2/select2.min.js"></script>
<script src="http://vote.on168.com.cn/jindu/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="http://vote.on168.com.cn/jindu/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 type="hidden" id="code" />
<input class="input-submit" type="button" value="开始答题" onclick="return check1()"/>
</div>
</article>
<section class="footer">
<img src="http://vote.on168.com.cn/jindu/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 value="0">幼儿园</option>
<option value="1">小学</option>
<option value="2">中学</option>
</select>
<select id="select2">
</select>
<input class="input-1 input-phone" id="mobile1" type="tel" placeholder="手机号码"/>
<input class="input-1 input-name" type="text" id="peoplename" placeholder="姓名(选填)"/>
<input class="input-submit" type="button" value="开始答题" onclick="return check2();" />
</div>
</article>
<section class="footer">
<img src="http://vote.on168.com.cn/jindu/images/copyright.gif"/> 杭州顺治科技股份有限公司
<br/>客服热线:<a>400-826-2468</a>
</section>
</div>--%>
</div>
</div>
</section>
<!--swiper-->
<link href="http://vote.on168.com.cn/jindu/assets/swiper/swiper.min.css" rel="stylesheet"/>
<script src="http://vote.on168.com.cn/jindu/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-->
<!--获取学校数据 start-->
<script>
$.ajax({
url: "Ajax/GetSchool",
data: {
schooltype: 0
},
type: 'get',
cache: true,
async: true,
dataType: 'json',
success: function (json) {
$('#select2').empty();
$('#select2').append("<option value='0'>选择学校</option>");
for(var i=0;i<json.Data.length;i++)
{
$('#select2').append("<option value='" + json.Data[i].SchoolName + "'>" + json.Data[i].SchoolName + "</option>");
}
}
});
$('#select1').change(function() {
$.ajax({
url: "Ajax/GetSchool",
data: {
schooltype: $(this).val()
},
type: 'get',
cache: true,
async: true,
dataType: 'json',
success: function(json) {
$('#select2').empty();
$('#select2').append("<option value='0'>选择学校</option>");
for (var i = 0; i < json.Data.length; i++) {
$('#select2').append("<option value='" + json.Data[i].SchoolName + "'>" + json.Data[i].SchoolName + "</option>");
}
}
});
});
</script>
<!--获取学校数据 End-->
<!--提示框-->
<link href="http://vote.on168.com.cn/jindu/assets/AlerStatus/AlerStatus.css" rel="stylesheet"/>
<script src="http://vote.on168.com.cn/jindu/assets/AlerStatus/AlerStatus.js"></script>
<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 myDate2 = new Date();
var thisdate = myDate2.getTime();
var localTime = parseInt(localStorage.getItem("curTime"));
console.log(typeof(thisdate));
console.log(typeof(parseInt(localTime)));
console.log((thisdate - localTime)/1000-30);
if (localTime != "underfined" && localTime != "" && ((thisdate - localTime) / 1000 - 30) <= 60) {
return false;
}
var $this = $(this);
var myDate = new Date();
var curTime = myDate.getTime();
localStorage.setItem("curTime", curTime);
//发送验证码
$.post("Ajax/SendMsgCode", { mobile: mobile }, function(json) {
if (json.Status==1) {
$('#code').val(json.Data);
//发送验证码
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);
}
}else if (json.Status == 3) {
$.AlerStatus({
status: 'error', //状态
msg: json.Message, //文字0
duration: 2000
});
setTimeout(function() {
location.href = "Thanks.html?mobile=" + mobile;
}, 2000);
}
else {
$.AlerStatus({
status: 'error', //状态
msg: json.Message, //文字0
duration: 2000
});
}
},'json');
});
//选择身份
//点击学生家长
$('.slide-0 .a-student').on('click',function(){
swiper.slideNext();
});
//点击热心市民
$('.slide-0 .a-people').on('click',function(){
swiper.slideTo(2);
});
});
//发送完验证码后,点击下一步
function check1(){
//判断是否填入手机
var mobile = $('#mobile').val();
if (!mobile) {
showTips($('#mobile'), '请填入手机号', 'error');
return false;
}
//判断是否填入验证码
var ver=$('#ver').val();
if (!ver) {
showTips($('#ver'), '请填入验证码', 'error');
return false;
}
/*
*需检查验证码
*/
var code = $('#code').val();
if (ver == code) {
//去后台判断是否符合要求,是否已经答过题
$.post("Ajax/CheckCode", { mobile: mobile,usertype:0 }, function (json) {
//符合要求,进入答题页面
if (json.Status == 1) {
//手机号码存入本地
localStorage.setItem('mobile', mobile);
localStorage.setItem('name', json.Data);
localStorage.setItem('schoolname', json.Message);
location.href = "Question.html?userType=0";
}else if (json.Status == 3) { //已经答过题了,跳转到页面
location.href = "Thanks.html?mobile="+mobile;
} else {
$.AlerStatus({
status: 'error', //状态
msg: json.Message, //文字0
duration: 2000
});
}
}, 'json');
} else {
$.AlerStatus({
status: 'error', //状态
msg: "输入验证码错误", //文字0
duration: 2000
});
}
};
//判断普通市民
function check2() {
//判断是否填入手机
var mobile = $('#mobile1').val();
if (!mobile) {
showTips($('#mobile1'), '请填入手机号', 'error');
return false;
}
var schoolname = $('#select2').val();
var peoplename = $('#peoplename').val();
if (schoolname == "0") {
showTips($('#select2'), '请选择学校', 'error');
return false;
}
//去后台判断是否符合要求,是否已经答过题
$.post("Ajax/CheckCode", { mobile: mobile,usertype:1 }, function (json) {
//符合要求,进入答题页面
if (json.Status == 1) {
//手机号码存入本地
localStorage.setItem('mobile', mobile);
localStorage.setItem('name', peoplename);
localStorage.setItem('schoolname', schoolname);
location.href = "Question.html?userType=1";
} else if (json.Status == 3) { //已经答过题了,跳转到页面
location.href = "Thanks.html?mobile="+mobile;
} else {
$.AlerStatus({
status: 'error', //状态
msg: json.Message, //文字0
duration: 2000
});
}
}, 'json');
}
/*表单提示*/
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>
<div style="display:none;">
<!-- #include file="cs.aspx" -->
<img src="<%= new CS("1259782995").TrackPageView()%>" width="0" height="0"/>
</div>
</body>
</html>