Commit 1723e1be authored by 黄奎's avatar 黄奎

11

parent 3cb323f3
...@@ -73,8 +73,6 @@ ...@@ -73,8 +73,6 @@
radios.forEach(radio => { radios.forEach(radio => {
radio.addEventListener('click', function() { radio.addEventListener('click', function() {
x.ScoreNum = radio.value x.ScoreNum = radio.value
// 当单选按钮被点击时,输出它的值
// console.log('Selected value:', radio.value);
}); });
}); });
}) })
......
...@@ -420,8 +420,6 @@ ...@@ -420,8 +420,6 @@
display: flex; display: flex;
flex-direction: column; flex-direction: column;
flex: 1; flex: 1;
/* overflow: hidden;
overflow-y: auto; */
padding-bottom: 20px; padding-bottom: 20px;
} }
......
<!DOCTYPE html> <!DOCTYPE html>
<html lang="en"> <html lang="en">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<meta http-equiv="X-UA-Compatible" content="IE=edge">
<meta name="viewport" content="width=device-width, initial-scale=1.0, maximum-scale=1.0, minimum-scale=1.0, user-scalable=no, target-densitydpi=device-dpi" />
<meta name="screen-orientation" content="portrait">
</meta>
<meta name="x5-orientation" content="portrait">
</meta>
<link rel="shortcut icon" href="../../images/favicon.ico" type="image/x-icon" />
<link rel="stylesheet" href="../../css/cssReset.css">
<link rel="stylesheet" href="../../css/bts/bootstrap.min.css">
<title>验证</title>
</head>
<body>
<div class="login_content" id="login_content">
<div class="login_button" id="login_button">
<button onclick="changeLoginType(1)">手机号验证</button>
<button onclick="changeLoginType(2)">护照号验证</button>
</div>
</div>
<div class="Passport_phone" id="login_phone">
<div class="PassportForm">
<h3>身份确认</h3>
<input type="phone" class="form-control" id="loginFormT" autocomplete="new-password" placeholder="请输入手机号码" onblur="activeFun(1)">
<button onclick="guestLogin()" class="PassportB" id="loginB">确认</button>
<div class="loginBackBox">
<img class="BackImg" onclick="goBack()" src="../../images/login/login_arrowleft.png" />
</div>
</div>
</div>
<div class="Passport_phone" id="Passport_phone">
<div class="PassportForm">
<h3>身份确认</h3>
<input type="phone" class="form-control" id="PassportFormT" autocomplete="new-password" placeholder="请输入护照号" onblur="activeFun(2)">
<button onclick="guestLogin()" class="PassportB" id="PassportB">确认</button>
<div class="loginBackBox">
<img class="BackImg" onclick="goBack()" src="../../images/login/login_arrowleft.png" />
</div>
</div>
</div>
<head> <script src="../../js/md5.js"></script>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" /> <script type="text/javascript" src="../../js/autosize.js"></script>
<meta http-equiv="X-UA-Compatible" content="IE=edge"> <script type="text/javascript" src="../../js/jquery-1.10.2.js"></script>
<meta name="viewport" content="width=device-width, initial-scale=1.0, maximum-scale=1.0, minimum-scale=1.0, user-scalable=no, target-densitydpi=device-dpi" /> <script src="../../js/layer/layer.js"></script>
<meta name="screen-orientation"content="portrait"></meta> <script src="../../js/mian.js"></script>
<meta name="x5-orientation"content="portrait"></meta> <script>
<link rel="shortcut icon" href="../../images/favicon.ico" type="image/x-icon" /> var phoneReg = /^1([38][0-9]|4[579]|5[0-3,5-9]|6[6]|7[0135678]|9[89])\d{8}$/
<link rel="stylesheet" href="../../css/cssReset.css"> var IsNumEn = /^[a-zA-Z0-9]+$/
<link rel="stylesheet" href="../../css/bts/bootstrap.min.css"> var msg = {
<title>验证</title> type: 0, //1-手机号码验证登录,2-护照号码验证登录
</head> //E75385750 13970261014
guestMobile: "", //1-为手机号码,2-护照号码
TCID: query().TCID
}
$('#login_content').show()
$('#login_phone').hide()
$('#Passport_phone').hide()
<body> function goBack() {
$('#login_content').show()
<div class="login_content" id="login_content"> $('#login_phone').hide()
<div class="login_button" id="login_button"> $('#Passport_phone').hide()
<button onclick="changeLoginType(1)">手机号验证</button> }
<button onclick="changeLoginType(2)">护照号验证</button>
</div>
</div>
<!-- <div class="login_phone" id="login_phone"> function changeLoginType(type) {
<div class="loginForm"> $('#login_content').hide()
<div class="loginFormT"> if (type == 1) $('#login_phone').show()
<div><img class="logo" src="../../images/phone.png" alt=""></div> if (type == 2) $('#Passport_phone').show()
<input type="phone" class="form-control" id="loginFormT" autocomplete="new-password" msg.type = type
placeholder="请输入手机号码" }
onblur="activeFun(1)">
</div>
<button onclick="guestLogin()" class="loginB" id="loginB">确认</button>
<div class="loginBackBox">
<img class="BackImg" onclick="goBack()" src="../../images/login/login_arrowleft.png" />
</div>
</div>
</div> -->
<div class="Passport_phone" id="login_phone"> function guestLogin() {
<div class="PassportForm"> if (msg.type == 1) {
<h3>身份确认</h3> let phone = $(`#loginFormT`).val()
<input type="phone" class="form-control" id="loginFormT" autocomplete="new-password" let obj = $(`#loginB`)
placeholder="请输入手机号码" //电话验证
onblur="activeFun(1)"> if (!phoneReg.test(phone)) {
<button onclick="guestLogin()" class="PassportB" id="loginB">确认</button> obj.attr('disabled', true);
<div class="loginBackBox"> return layer.msg('请输入有效的手机号码!');
<img class="BackImg" onclick="goBack()" src="../../images/login/login_arrowleft.png" /> }
</div> msg.guestMobile = phone
</div> }
</div> if (msg.type == 2) {
let Passport = $(`#PassportFormT`).val()
// let objPassport = $(`#PassportB`)
// //电话验证
// if (!IsNumEn.test(Passport)) {
// objPassport.attr('disabled', true);
// return layer.msg('请输入有效的护照号!');
// } else {
// objPassport.attr('disabled', false);
// }
msg.guestMobile = Passport
}
<div class="Passport_phone" id="Passport_phone"> $.ajax({
<div class="PassportForm"> type: "POST",
<h3>身份确认</h3> url: `${getApiUrl().urlPost}`,
<input type="phone" class="form-control" id="PassportFormT" autocomplete="new-password" contentType: "application/json",
placeholder="请输入护照号" data: getAjaxData("miniProgram_price_GetGuestByPhone_V2", msg),
onblur="activeFun(2)"> async: false, //使用同步的方式,true为异步方式
<button onclick="guestLogin()" class="PassportB" id="PassportB">确认</button> success: function(res) {
<div class="loginBackBox"> if (res.resultCode === 1) {
<img class="BackImg" onclick="goBack()" src="../../images/login/login_arrowleft.png" /> var tempData = res.data
</div> if (tempData && tempData.length > 0) {
</div> var datas = {
</div> TCID: msg.TCID,
GuestId: tempData[0].Id,
<script src="../../js/md5.js"></script> SurName: tempData[0].SurName ? tempData[0].SurName : '',
<script type="text/javascript" src="../../js/autosize.js"></script> Sex: tempData[0].Sex,
<script type="text/javascript" src="../../js/jquery-1.10.2.js"></script> OrderId: tempData[0].OrderId,
<script src="../../js/layer/layer.js"></script> }
<script src="../../js/mian.js"></script> if (msg.type == 1) window.location.href = 'MobileVerification.html?TCID=' + datas.TCID + '&GuestId=' + datas
<script> .GuestId + '&SurName=' + datas.SurName + '&Sex=' + datas.Sex + '&OrderId=' + datas.OrderId + '&phone=' +
var phoneReg = /^1([38][0-9]|4[579]|5[0-3,5-9]|6[6]|7[0135678]|9[89])\d{8}$/ msg.guestMobile
var IsNumEn = /^[a-zA-Z0-9]+$/ if (msg.type == 2) window.location.href = 'guestSign.html?TCID=' + datas.TCID + '&GuestId=' + datas.GuestId +
var msg = { '&SurName=' + datas.SurName + '&Sex=' + datas.Sex + '&OrderId=' + datas.OrderId + '&phone=' + msg.guestMobile
type: 0, //1-手机号码验证登录,2-护照号码验证登录 }
//E75385750 13970261014 } else {
guestMobile: "", //1-为手机号码,2-护照号码 layer.msg(res.message)
TCID: query().TCID }
} },
$('#login_content').show() error: function(message) {
$('#login_phone').hide() alert("提交失败" + JSON.stringify(message));
$('#Passport_phone').hide() }
function goBack() { });
$('#login_content').show() }
$('#login_phone').hide()
$('#Passport_phone').hide() function activeFun(type) {
} if (type == 1) {
function changeLoginType(type){ let phone = $(`#loginFormT`).val()
$('#login_content').hide() let obj = $(`#loginB`)
if(type==1) $('#login_phone').show() //电话验证
if(type==2) $('#Passport_phone').show() if (!phoneReg.test(phone)) {
msg.type = type obj.attr('disabled', true);
} return layer.msg('请输入有效的手机号码!');
function guestLogin(){ } else {
if(msg.type==1){ obj.attr('disabled', false);
let phone = $(`#loginFormT`).val() }
let obj = $(`#loginB`) }
//电话验证 if (type == 2) {
if (!phoneReg.test(phone)) { // let Passport = $(`#PassportFormT`).val()
obj.attr('disabled', true); // let objPassport = $(`#PassportB`)
return layer.msg('请输入有效的手机号码!'); // //电话验证
} // if (!IsNumEn.test(Passport)) {
msg.guestMobile = phone // objPassport.attr('disabled', true);
} // return layer.msg('请输入有效的护照号!');
if(msg.type==2){ // } else {
let Passport = $(`#PassportFormT`).val() // objPassport.attr('disabled', false);
let objPassport = $(`#PassportB`) // }
//电话验证 }
if (!IsNumEn.test(Passport)) {
objPassport.attr('disabled', true); }
return layer.msg('请输入有效的护照号!'); </script>
}else { </body>
objPassport.attr('disabled', false); <style>
} .login_content {
msg.guestMobile = Passport height: 100%;
} display: flex;
flex-direction: column;
$.ajax({ align-items: center;
type: "POST", justify-content: center;
url: `${getApiUrl().urlPost}`, }
contentType: "application/json",
data: getAjaxData("miniProgram_price_GetGuestByPhone_V2", msg), .login_button {
async: false,//使用同步的方式,true为异步方式 width: 100%;
success: function (res) { display: flex;
if (res.resultCode === 1) { flex-direction: column;
var tempData = res.data align-items: center;
if(tempData&&tempData.length>0){ padding: 0 10%;
var datas = { }
TCID: msg.TCID,
GuestId:tempData[0].Id, .login_button button {
SurName: tempData[0].SurName?tempData[0].SurName:'', width: 100%;
Sex:tempData[0].Sex, height: 40px;
OrderId:tempData[0].OrderId, margin-bottom: 20px;
} border: 0;
if(msg.type==1) window.location.href='MobileVerification.html?TCID='+datas.TCID+'&GuestId='+datas.GuestId+'&SurName='+datas.SurName+'&Sex='+datas.Sex+'&OrderId='+datas.OrderId+'&phone='+msg.guestMobile background-color: #419EFD;
if(msg.type==2) window.location.href='guestSign.html?TCID='+datas.TCID+'&GuestId='+datas.GuestId+'&SurName='+datas.SurName+'&Sex='+datas.Sex+'&OrderId='+datas.OrderId+'&phone='+msg.guestMobile color: #fff;
} border-radius: 5px;
} else { }
layer.msg(res.message)
} .login_button button:last-child {
}, background-color: #67C239;
error: function (message) { }
alert("提交失败" + JSON.stringify(message));
} .login_phone {
}); padding: 0 10%;
} height: 100%;
function activeFun(type) { display: flex;
if(type==1){ flex-direction: column;
let phone = $(`#loginFormT`).val() align-items: center;
let obj = $(`#loginB`) justify-content: center;
//电话验证 }
if (!phoneReg.test(phone)) {
obj.attr('disabled', true); .loginForm {
return layer.msg('请输入有效的手机号码!'); height: 100%;
}else { display: flex;
obj.attr('disabled', false); flex-direction: column;
} justify-content: center;
} align-items: center;
if(type==2){ }
let Passport = $(`#PassportFormT`).val()
let objPassport = $(`#PassportB`) .loginFormT {
//电话验证 width: 100%;
if (!IsNumEn.test(Passport)) { display: flex;
objPassport.attr('disabled', true); flex-direction: row;
return layer.msg('请输入有效的护照号!'); }
}else {
objPassport.attr('disabled', false); .logo {
} width: auto;
} margin-right: 15px;
}
.loginB {
margin-top: 20px;
width: 100%;
height: 40px;
border: 0;
background-color: #419EFD;
border-radius: 5px;
color: #fff;
} }
</script>
</body>
<style>
.login_content{
height: 100%;
display: flex;
flex-direction: column;
align-items: center;
justify-content: center;
}
.login_button{
width: 100%;
display: flex;
flex-direction: column;
align-items: center;
padding: 0 10%;
}
.login_button button{
width: 100%;
height: 40px;
margin-bottom: 20px;
border: 0;
background-color: #419EFD;
color: #fff;
border-radius: 5px;
}
.login_button button:last-child{
background-color: #67C239;
}
.login_phone{
padding: 0 10%;
height: 100%;
display: flex;
flex-direction: column;
align-items: center;
justify-content: center;
}
.loginForm{
height: 100%;
display: flex;
flex-direction: column;
justify-content: center;
align-items: center;
}
.loginFormT{
width: 100%;
display: flex;
flex-direction: row;
}
.logo{
width: auto;
margin-right: 15px;
}
.loginB{
margin-top: 20px;
width: 100%;
height: 40px;
border: 0;
background-color: #419EFD;
border-radius: 5px;
color: #fff;
}
.loginForm input{
flex: 1;
/* box-shadow: 0 0 0px rgba(74, 144, 226, 0.5) !important; */
border-bottom: 1px solid #F6F6F6 ;
}
.loginForm input:focus{
border: 1px solid #76c9fa;
outline: none;
}
.loginBackBox{
position: fixed;
left: 0;
top: 0;
right: 0;
background: #fff;
padding: 20px 20px 10px 20px;
z-index: 2;
}
.BackImg{
width: 10px;
}
.Passport_phone{
height: 100%;
overflow: hidden;
padding: 0 10%;
}
.PassportForm{
margin-top: 50px;
display: flex;
flex-direction: column;
}
.PassportForm input{
margin-top: 20px;
}
.PassportForm input:focus{
border: 1px solid #76c9fa;
outline: none;
}
.PassportB{
border: 0;
height: 40px;
margin-top: 20px;
border-radius: 5px;
background-color: #EE4554;
color: #fff;
}
</style> .loginForm input {
flex: 1;
/* box-shadow: 0 0 0px rgba(74, 144, 226, 0.5) !important; */
border-bottom: 1px solid #F6F6F6;
}
.loginForm input:focus {
border: 1px solid #76c9fa;
outline: none;
}
.loginBackBox {
position: fixed;
left: 0;
top: 0;
right: 0;
background: #fff;
padding: 20px 20px 10px 20px;
z-index: 2;
}
.BackImg {
width: 10px;
}
.Passport_phone {
height: 100%;
overflow: hidden;
padding: 0 10%;
}
.PassportForm {
margin-top: 50px;
display: flex;
flex-direction: column;
}
.PassportForm input {
margin-top: 20px;
}
.PassportForm input:focus {
border: 1px solid #76c9fa;
outline: none;
}
.PassportB {
border: 0;
height: 40px;
margin-top: 20px;
border-radius: 5px;
background-color: #EE4554;
color: #fff;
}
</style>
</html> </html>
\ No newline at end of file
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment