identityAuthentication.js
1.48 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
layui.use('element', function () {
});
$(function () {
addTabs('#wssq')
setAcceptFlow(GetQueryString('bsm_slsq'), GetQueryString('businessno'));
if (business.sqfs=='1') {
$('#sqfs').text('单方申请')
}else {
$('#sqfs').text('双方申请')
}
list = getApplyRecord(GetQueryString('bsm_slsq'), GetQueryString('businessno'));
})
//下一步事件
function skipClick() {
skipNextPage(GetQueryString('bsm_slsq'), GetQueryString('businessno'));
}
// 验证码
var timer = "";
var nums = 60;
var validCode = true;//定义该变量是为了处理后面的重复点击事件
$(".captcha").click(function () {
let value = $('.phoneInput').val()
if (validatorTel(value)) {
var code = $(this);
if (validCode) {
validCode = false;
yanzheng()
timer = setInterval(function () {
yanzheng()
}, 1000)
}
function yanzheng() {
if (nums > 0) {
nums--;
code.text(nums + "秒后重新发送");
code.addClass("layui-btn-disabled");
}
else {
clearInterval(timer);
nums = 60;//重置回去
validCode = true;
code.removeClass("layui-btn-disabled");
code.text("发送验证码");
}
}
} else {
layui.use('layer', function () {
layer.msg('请输入正确手机号!');
})
}
})