优化输入

master
chenzhi 5 years ago
parent 505da6289b
commit 08c37b030e

@ -324,19 +324,28 @@
var validCode=true; var validCode=true;
var smsstatus = true; var smsstatus = true;
function getSms() { function getSms() {
if ($("#custName").val() == '' || $("#idNo").val() == '' || $("#phoneNo").val() == '') { // if ($("#custName").val() == '' || $("#idNo").val() == '' || $("#phoneNo").val() == '') {
$("#tipmsg").html('参数不能为空'); // $("#tipmsg").html('参数不能为空');
$("#msgdialog").show(); // $("#msgdialog").show();
// return ;
// }
if(Check.trim($("#custName").val()) == ''){
Tip.msgShow('名字不能为空');
return ; return ;
} }
if(!Check.idcardCheck($("#idNo").val())){
return;
}
if(!Check.mobileCheck($("#phoneNo").val())){
return;
}
if (!smsstatus) return; if (!smsstatus) return;
$("#sms").html("请求中"); $("#sms").html("请求中");
smsstatus = false; smsstatus = false;
var sms=document.getElementById("sms"); var sms=document.getElementById("sms");
/* $("#bankdialog").show();
return ; */
//获取短信验证码 //获取短信验证码
$.ajax({ $.ajax({
type: "POST", type: "POST",
@ -380,7 +389,7 @@
// 未签约 // 未签约
// 展示未签约页面 // 展示未签约页面
$("#sign_mibile").html($("#phoneNo").val()); $("#sign_mibile").html($("#phoneNo").val());
$("#bankdialog").show(); Tip.bankShow();
sms.innerText="获取验证码"; sms.innerText="获取验证码";
smsstatus = true; smsstatus = true;
} }
@ -396,7 +405,7 @@
$("#msgdialog").show(); $("#msgdialog").show();
$("#tipok").click(function(){ $("#tipok").click(function(){
$("#msgdialog").hide(); $("#msgdialog").hide();
$("#bankdialog").show(); Tip.bankShow();
$(this).off("click"); $(this).off("click");
}); });
return ; return ;
@ -502,7 +511,6 @@
var btnpay = false; var btnpay = false;
$("#wfsubmit").click(function(){ $("#wfsubmit").click(function(){
if (btnpay == true) return ; if (btnpay == true) return ;
var isok = true; var isok = true;
//名字 //名字
@ -530,7 +538,6 @@
if(isok){ if(isok){
btnpay = true; btnpay = true;
Tip.loadShow(); Tip.loadShow();
//更换表单提交方式
$.ajax({ $.ajax({
type: "POST", type: "POST",
dataType: "json", dataType: "json",
@ -581,7 +588,7 @@
} }
if (tiptype == 2) { if (tiptype == 2) {
$("#msgdialog").hide(); $("#msgdialog").hide();
$("#bankdialog").show(); Tip.bankShow();
} }
}); });
$("#close_doalog").click(function(){ $("#close_doalog").click(function(){
@ -604,6 +611,11 @@
$("#Dialog").show(); $("#Dialog").show();
Tip.showDom = $("#Dialog"); Tip.showDom = $("#Dialog");
}, },
bankShow:function(){
//自行处理
window.scrollTo(0, document.documentElement.clientHeight);
$("#bankdialog").show();
},
tipHide(){ tipHide(){
Tip._hideShow(); Tip._hideShow();
}, },

Loading…
Cancel
Save