identityAuthentication.js
2.8 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
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
$(function () {
layui.use('element', function () {
});
addTabs('#wssq')
setAcceptFlow(GetQueryString('bsm_slsq'), GetQueryString('businessno'));
list = getApplyRecord(GetQueryString('bsm_slsq'), GetQueryString('businessno'));
console.log(list)
Webcam.set({
width: 320,
height: 240,
image_format: 'jpeg',
jpeg_quality: 90
});
Webcam.attach('#my_camera');
})
function take_snapshot() {
// take snapshot and get image data
Webcam.snap(function (data_uri) {
// display results in page
document.getElementById('results').innerHTML =
'<h2>Here is your image:</h2>' +
'<img src="' + data_uri + '"/>';
});
}
//下一步事件
function skipClick() {
if (_SFYz() && list.sqfs == '2') {
$.ajax({
type: "post", //提交方式
url: portal.api_url + "/portal/FillInformation/ToZRF",//路径
dataType: "json",
contentType: 'application/json',
data: JSON.stringify({
"bsmSlsq": GetQueryString('bsm_slsq'),
}),
//数据,这里使用的是Json格式进行传输
success: function (result) {//返回数据根据结果进行相应的处理
if (result.code == 200) {
skipNextPage(GetQueryString('bsm_slsq'), GetQueryString('businessno'));
}
}
});
} else {
skipNextPage(GetQueryString('bsm_slsq'), GetQueryString('businessno'));
}
}
// 验证码
$(".captcha").click(function () {
$(".captcha").hide()
$(".num").show()
var second = 30
$(".num").text((second) + "秒")
var interval = setInterval(function () {
second--
$(".num").text((second) + "秒")
if (second === -1) {
$(".captcha").text("重发验证码")
clearInterval(interval)
$(".num").hide()
$(".captcha").show()
}
}, 1000)
})
// 身份验证
function _SFYz() {
var isVerification;
$.ajax({
type: "post", //提交方式
url: portal.api_url + "/portal/FillInformation/SFYz",//路径
dataType: "json",
contentType: 'application/json',
async: false,
data: JSON.stringify({
"dhhm": $('#phone').val(),
"yzm": $('#code').val(),
"bsmSlsq": GetQueryString('bsm_slsq')
}),
//数据,这里使用的是Json格式进行传输
success: function (result) {//返回数据根据结果进行相应的处理
if (result.code == 200) {
isVerification = true
} else {
isVerification = false
}
}
});
return isVerification
}
// /portal/FillInformation/ToZRF转给转入方进行流转