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.

116 lines
2.9 KiB

This file contains ambiguous Unicode characters!

This file contains ambiguous Unicode characters that may be confused with others in your current locale. If your use case is intentional and legitimate, you can safely ignore this warning. Use the Escape button to highlight these characters.

<!DOCTYPE html>
<html class="ui-page-login">
<head>
<meta charset="utf-8">
<meta name="viewport"
content="width=device-width,initial-scale=1,minimum-scale=1,maximum-scale=1,user-scalable=no" />
<title></title>
<link href="../css/mui.min.css" rel="stylesheet" />
<style>
.mui-input-group {
margin-top: 10px;
}
.mui-input-group:first-child {
margin-top: 20px;
}
.mui-input-group label {
width: 22%;
}
.mui-input-row label~input {
width: 78%;
}
.mui-content-padded {
margin-top: 25px;
}
.mui-btn {
padding: 10px;
}
</style>
</head>
<body>
<header class="mui-bar mui-bar-nav">
<h1 class="mui-title">请输入您的身份信息</h1>
</header>
<div class="mui-content">
<form id='login-form' class="mui-input-group">
<div class="mui-input-row">
<label style="width: 29%;"><span
style="margin-right: 2px;color: red;">*</span>&nbsp&nbsp&nbsp名</label>
<input style="width: 71%;" id='name' type="text" class="mui-input-clear mui-input" placeholder="请输入姓名">
</div>
<div class="mui-input-row">
<label style="width: 29%;"><span
style="margin-right: 2px;color: red;">*</span>&nbsp&nbsp&nbsp室</label>
<input style="width: 71%;" id='bureau' type="text" class="mui-input-clear mui-input"
placeholder="请输入科室">
</div>
<div class="mui-input-row">
<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>
<div class="mui-content-padded">
<button id='login' type="button" class="mui-btn mui-btn-block mui-btn-primary">开始答题</button>
</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>
$.removeCookie('order_id', { path: '/' });
var loginButton = document.getElementById('login');
loginButton.addEventListener('tap', function (event) {
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);
}
});
}
});
</script>
</body>
</html>