You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
146 lines
5.6 KiB
146 lines
5.6 KiB
<!DOCTYPE html>
|
|
<html lang="en">
|
|
<head>
|
|
<meta charset="UTF-8">
|
|
<title>返校报到</title>
|
|
<meta name="viewport" content="width=device-width, initial-scale=1,maximum-scale=1,user-scalable=no">
|
|
<meta name="apple-mobile-web-app-capable" content="yes">
|
|
<meta name="apple-mobile-web-app-status-bar-style" content="black">
|
|
<!--标准mui.css-->
|
|
<link rel="stylesheet" href="../../lib/mui/css/mui.min.css">
|
|
<!--App自定义的css-->
|
|
<link rel="stylesheet" type="text/css" href="../../lib/mui/css/app.css"/>
|
|
<style>
|
|
.title{
|
|
margin: 20px 15px 7px;
|
|
color: #6d6d72;
|
|
font-size: 15px;
|
|
}
|
|
</style>
|
|
</head>
|
|
<body>
|
|
<script src="../../lib/mui/js/mui.min.js"></script>
|
|
<script type="text/javascript">
|
|
mui.ready(function() {
|
|
var place_id = GetQueryString("place_id");
|
|
var wx_openid = GetQueryString("wx_openid");
|
|
var person_id;
|
|
var person_name;
|
|
var place_checkin_qrcode;
|
|
var place_signin_qrcode;
|
|
var domain = "";
|
|
mui.ajax("/baseService/mobile/student_main_interface",{
|
|
data:{
|
|
wx_openid:wx_openid
|
|
},
|
|
async:false,
|
|
type: "GET",
|
|
dataType:'json',
|
|
error:function(xhr,status,statusText){
|
|
alert("请求失败,状态:"+statusText+","+status);
|
|
},
|
|
success:function(json){
|
|
var obj = eval(json);
|
|
mui.each(obj,function(index,array){
|
|
person_name = array['person_name'];
|
|
person_id = array['person_id'];
|
|
})
|
|
}
|
|
});
|
|
mui.ajax("/baseService/mobile/getWxDomain",{
|
|
type: "GET",
|
|
async:false,
|
|
dataType:'json',
|
|
error:function(xhr,status,statusText){
|
|
alert("请求失败,状态:"+statusText+","+status);
|
|
},
|
|
success:function(json){
|
|
var obj = eval(json);
|
|
mui.each(obj,function(index,array){
|
|
domain = array['domain'];
|
|
})
|
|
}
|
|
});
|
|
mui.ajax("/baseService/mobile/getPlaceInfoById",{
|
|
data:{
|
|
place_id:place_id
|
|
},
|
|
type: "GET",
|
|
async:false,
|
|
dataType:'json',
|
|
error:function(xhr,status,statusText){
|
|
alert("请求失败,状态:"+statusText+","+status);
|
|
},
|
|
success:function(json){
|
|
var obj = eval(json);
|
|
mui.each(obj,function(index,array){
|
|
place_checkin_qrcode = array['place_checkin_qrcode'];
|
|
place_signin_qrcode = array['place_signin_qrcode'];
|
|
})
|
|
}
|
|
});
|
|
if(place_checkin_qrcode!=-1){
|
|
mui.ajax("/baseService/mobile/scanningCheckin",{
|
|
data:{
|
|
person_id:person_id,
|
|
place_id:place_id
|
|
},
|
|
type: "GET",
|
|
async:false,
|
|
dataType:'json',
|
|
error:function(xhr,status,statusText){
|
|
alert("请求失败,状态:"+statusText+","+status);
|
|
},
|
|
success:function(json){
|
|
if(json.message=="200"){
|
|
mui.alert(person_name+"同学,欢迎您返校!报道成功!", function() {
|
|
window.location.href = "http://"+domain+"/baseService/html/pages/mobile/wx_stu_checkin_result.html?person_id="+person_id+"&place_id="+place_id;
|
|
});
|
|
}else if(json.message=="103"){
|
|
mui.alert(person_name+"同学,请提交返校申请后再报到!", function() {
|
|
WeixinJSBridge.call('closeWindow');
|
|
});
|
|
}else if(json.message=="104"){
|
|
mui.alert(person_name+"同学,您提交的返校申请未审批,请联系辅导员审批后再报到!", function() {
|
|
WeixinJSBridge.call('closeWindow');
|
|
});
|
|
}else if(json.message=="105"){
|
|
mui.alert(person_name+"同学,您本学期您已报到,请勿重复扫码!", function() {
|
|
WeixinJSBridge.call('closeWindow');
|
|
});
|
|
}
|
|
}
|
|
});
|
|
}else if(place_signin_qrcode!=-1){
|
|
mui.ajax("/baseService/mobile/scanningSignin",{
|
|
data:{
|
|
place_id:place_id,
|
|
person_id:person_id
|
|
},
|
|
type: "GET",
|
|
async:false,
|
|
dataType:'json',
|
|
error:function(xhr,status,statusText){
|
|
alert("请求失败,状态:"+statusText+","+status);
|
|
},
|
|
success:function(json){
|
|
mui.alert(person_name+json.message, function() {
|
|
window.location.href = "http://"+domain+"/baseService/html/pages/mobile/wx_stu_checkin_result.html?person_id="+person_id+"&place_id="+place_id;
|
|
});
|
|
}
|
|
});
|
|
}
|
|
function GetQueryString(name)
|
|
{
|
|
var reg = new RegExp("(^|&)"+ name +"=([^&]*)(&|$)");
|
|
var r = window.location.search.substr(1).match(reg);//search,查询?后面的参数,并匹配正则
|
|
if(r!=null){
|
|
return unescape(r[2]);
|
|
}else{
|
|
return null;
|
|
}
|
|
}
|
|
})
|
|
</script>
|
|
</body>
|
|
</html> |