|
|
|
@ -43,16 +43,19 @@
|
|
|
|
|
<div class="mui-content">
|
|
|
|
|
<form id='login-form' class="mui-input-group">
|
|
|
|
|
<div class="mui-input-row">
|
|
|
|
|
<label>姓名</label>
|
|
|
|
|
<input id='name' type="text" class="mui-input-clear mui-input" placeholder="请输入姓名">
|
|
|
|
|
<label style="width: 29%;"><span
|
|
|
|
|
style="margin-right: 2px;color: red;">*</span>姓   名:</label>
|
|
|
|
|
<input style="width: 71%;" id='name' type="text" class="mui-input-clear mui-input" placeholder="请输入姓名">
|
|
|
|
|
</div>
|
|
|
|
|
<div class="mui-input-row">
|
|
|
|
|
<label>科室</label>
|
|
|
|
|
<input id='bureau' type="text" class="mui-input-clear mui-input" placeholder="请输入科室">
|
|
|
|
|
<label style="width: 29%;"><span
|
|
|
|
|
style="margin-right: 2px;color: red;">*</span>科   室:</label>
|
|
|
|
|
<input style="width: 71%;" id='bureau' type="text" class="mui-input-clear mui-input"
|
|
|
|
|
placeholder="请输入科室">
|
|
|
|
|
</div>
|
|
|
|
|
<div class="mui-input-row">
|
|
|
|
|
<label>手机号</label>
|
|
|
|
|
<input id='tel' type="text" class="mui-input-clear mui-input" placeholder="请输入手机号">
|
|
|
|
|
<label style="width: 29%;"><span style="margin-right: 2px;color: red;">*</span>手机号:</label>
|
|
|
|
|
<input style="width: 71%;" id='tel' type="text" class="mui-input-clear mui-input" placeholder="请输入手机号">
|
|
|
|
|
</div>
|
|
|
|
|
|
|
|
|
|
</form>
|
|
|
|
@ -62,12 +65,12 @@
|
|
|
|
|
|
|
|
|
|
</div>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
</div>
|
|
|
|
|
<script src="../js/jquery.min.js"></script>
|
|
|
|
|
<script src="../js/jquery.cookie.min.js"></script>
|
|
|
|
|
<script src="../js/mui.min.js"></script>
|
|
|
|
|
<script src="../js/mui.min.js"></script>
|
|
|
|
|
|
|
|
|
|
<script>
|
|
|
|
|
|
|
|
|
@ -77,26 +80,35 @@
|
|
|
|
|
|
|
|
|
|
loginButton.addEventListener('tap', function (event) {
|
|
|
|
|
|
|
|
|
|
mui.ajax('/FengHuang/exam/addPerson', {
|
|
|
|
|
data: {
|
|
|
|
|
person_name: $("#name").val(),
|
|
|
|
|
ks: $("#bureau").val(),
|
|
|
|
|
tel: $("#tel").val()
|
|
|
|
|
},
|
|
|
|
|
type: 'post',
|
|
|
|
|
success: function (res) {
|
|
|
|
|
if (res.success) {
|
|
|
|
|
window.location = "./exam.html";
|
|
|
|
|
} else {
|
|
|
|
|
mui.alert('该人员已完成答题,不允许重复答题!', '提示');
|
|
|
|
|
if ($("#name").val().trim().length == 0) {
|
|
|
|
|
mui.alert('姓名不能为空!', '提示');
|
|
|
|
|
} else if ($("#bureau").val().trim().length == 0) {
|
|
|
|
|
mui.alert('科室不能为空!', '提示');
|
|
|
|
|
} else if ($("#tel").val().trim().length == 0) {
|
|
|
|
|
mui.alert('手机号不能为空!', '提示');
|
|
|
|
|
} else {
|
|
|
|
|
mui.ajax('/FengHuang/exam/addPerson', {
|
|
|
|
|
data: {
|
|
|
|
|
person_name: $("#name").val(),
|
|
|
|
|
ks: $("#bureau").val(),
|
|
|
|
|
tel: $("#tel").val()
|
|
|
|
|
},
|
|
|
|
|
type: 'post',
|
|
|
|
|
success: function (res) {
|
|
|
|
|
if (res.success) {
|
|
|
|
|
window.location = "./exam.html";
|
|
|
|
|
} else {
|
|
|
|
|
mui.alert('该人员已完成答题,不允许重复答题!', '提示');
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
},
|
|
|
|
|
error: function (xhr, type, errorThrown) {
|
|
|
|
|
//异常处理;
|
|
|
|
|
console.log(type);
|
|
|
|
|
}
|
|
|
|
|
});
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
},
|
|
|
|
|
error: function (xhr, type, errorThrown) {
|
|
|
|
|
//异常处理;
|
|
|
|
|
console.log(type);
|
|
|
|
|
}
|
|
|
|
|
});
|
|
|
|
|
});
|
|
|
|
|
</script>
|
|
|
|
|
</body>
|
|
|
|
|