支付宝验证
This commit is contained in:
@@ -50,7 +50,7 @@
|
||||
crossDomain: true,
|
||||
success: function (res) {
|
||||
if (res.Code == -10000) {
|
||||
alert('接主管部门要求,账号需要实名认证方可使用主要功能,请前往用户主页实名认证。');
|
||||
alert('接主管部门要求,账号需要实名认证方可使用主要功能,请前往 电脑端 用户主页实名认证。');
|
||||
window.location.href="/User/Index";
|
||||
}
|
||||
}
|
||||
|
||||
@@ -35,7 +35,7 @@
|
||||
crossDomain: true,
|
||||
success: function (res) {
|
||||
if (res.Code == -10000) {
|
||||
alert('接主管部门要求,账号需要实名认证方可使用主要功能,请前往用户主页实名认证。');
|
||||
alert('接主管部门要求,账号需要实名认证方可使用主要功能,请前往 电脑端 用户主页实名认证。');
|
||||
window.location.href="/User/Index";
|
||||
}
|
||||
}
|
||||
|
||||
@@ -71,7 +71,7 @@
|
||||
<!-- 账户信息 -->
|
||||
<div class="accout_tit"><span class="lineBar"></span>账户信息 <button class="btnXq" onclick="$('#infoBox').show()">完善信息</button>
|
||||
<button class="btnXq" onclick="$('#pwdBox').show()">修改密码</button>
|
||||
<button class="btnXq" id="real-name-confirm" onclick="$('#real-name').show()">实名认证</button>
|
||||
<!-- <button class="btnXq" id="real-name-confirm" onclick="$('#real-name').show()">实名认证</button> -->
|
||||
</div>
|
||||
<div class="model">
|
||||
<div class="item">
|
||||
@@ -328,6 +328,8 @@
|
||||
<div id="aliPayBox" style="display:none"></div>
|
||||
|
||||
<script>
|
||||
|
||||
var t1 = null;
|
||||
/** 表单序列化成json字符串的方法 */
|
||||
function form2JsonString(formId) {
|
||||
var paramArray = $('#' + formId).serializeArray();
|
||||
@@ -414,6 +416,45 @@
|
||||
});
|
||||
}
|
||||
|
||||
// function realname(){
|
||||
// let id_code = $('#real-name-code').val(),
|
||||
// name = $('#real-name-name').val();
|
||||
|
||||
// if(id_code.length <= 0){
|
||||
// alert("抱歉!请重新输入身份证号!");
|
||||
// return;
|
||||
// }
|
||||
// if(name.length <= 0){
|
||||
// alert("抱歉!请重新输入姓名!");
|
||||
// return;
|
||||
// }
|
||||
|
||||
// let data = {
|
||||
// cookie:document.cookie,
|
||||
// id_code: id_code,
|
||||
// name: name
|
||||
// }
|
||||
// $.ajax({
|
||||
// type: 'POST',
|
||||
// url: 'http://php-api.juip.com/api/Realname/index',
|
||||
// dataType: "json",
|
||||
// contentType: "application/json",
|
||||
// data: JSON.stringify(data),
|
||||
// beforeSend: function(xhr) {
|
||||
// xhr.withCredentials = true;
|
||||
// },
|
||||
// crossDomain: true,
|
||||
// success: function (res) {
|
||||
// if (res.Code == 10000) {
|
||||
// $('.real-name').hide();
|
||||
// alert('实名认证成功。');
|
||||
// } else {
|
||||
// alert('请正确填写姓名和身份证号码。');
|
||||
// }
|
||||
// }
|
||||
// });
|
||||
// }
|
||||
|
||||
function realname(){
|
||||
let id_code = $('#real-name-code').val(),
|
||||
name = $('#real-name-name').val();
|
||||
@@ -426,15 +467,17 @@
|
||||
alert("抱歉!请重新输入姓名!");
|
||||
return;
|
||||
}
|
||||
|
||||
|
||||
let data = {
|
||||
cookie:document.cookie,
|
||||
id_code: id_code,
|
||||
name: name
|
||||
}
|
||||
|
||||
|
||||
$.ajax({
|
||||
type: 'POST',
|
||||
url: 'http://php-api.juip.com/api/Realname/index',
|
||||
url: 'http://php-api.juip.com/api/test/aliverify',
|
||||
dataType: "json",
|
||||
contentType: "application/json",
|
||||
data: JSON.stringify(data),
|
||||
@@ -444,13 +487,65 @@
|
||||
crossDomain: true,
|
||||
success: function (res) {
|
||||
if (res.Code == 10000) {
|
||||
$('.real-name').hide();
|
||||
alert('实名认证成功。');
|
||||
const certifyUrl = 'alipays://platformapi/startapp?appId=20000067&url='+encodeURIComponent(res.url);
|
||||
window.location.href=certifyUrl
|
||||
// t1 = window.setInterval(get_verify_res,1500);
|
||||
|
||||
} else {
|
||||
alert('请正确填写姓名和身份证号码。');
|
||||
}
|
||||
|
||||
|
||||
}
|
||||
});
|
||||
|
||||
// let data = {
|
||||
// cookie:document.cookie,
|
||||
// id_code: id_code,
|
||||
// name: name
|
||||
// }
|
||||
// $.ajax({
|
||||
// type: 'POST',
|
||||
// url: 'http://php-api.juip.com/api/Realname/index',
|
||||
// dataType: "json",
|
||||
// contentType: "application/json",
|
||||
// data: JSON.stringify(data),
|
||||
// beforeSend: function(xhr) {
|
||||
// xhr.withCredentials = true;
|
||||
// },
|
||||
// crossDomain: true,
|
||||
// success: function (res) {
|
||||
// if (res.Code == 10000) {
|
||||
// $('.real-name').hide();
|
||||
// alert('实名认证成功。');
|
||||
// } else {
|
||||
// alert('请正确填写姓名和身份证号码。');
|
||||
// }
|
||||
// }
|
||||
// });
|
||||
}
|
||||
|
||||
function get_verify_res(){
|
||||
let data = {
|
||||
cookie:document.cookie
|
||||
}
|
||||
$.ajax({
|
||||
type: 'POST',
|
||||
url: 'http://php-api.juip.com/api/test/aliGetResult',
|
||||
dataType: "json",
|
||||
contentType: "application/json",
|
||||
data: JSON.stringify(data),
|
||||
beforeSend: function(xhr) {
|
||||
xhr.withCredentials = true;
|
||||
},
|
||||
crossDomain: true,
|
||||
success: function (res) {
|
||||
if (res.Code == 10000) {
|
||||
clearInterval(t1);
|
||||
window.location.href='/User/Index';
|
||||
}
|
||||
}
|
||||
});
|
||||
}
|
||||
|
||||
function cash_out() {
|
||||
|
||||
@@ -25,7 +25,7 @@
|
||||
crossDomain: true,
|
||||
success: function (res) {
|
||||
if (res.Code == -10000) {
|
||||
alert('接主管部门要求,账号需要实名认证方可使用主要功能,请前往用户主页实名认证。');
|
||||
alert('接主管部门要求,账号需要实名认证方可使用主要功能,请前往 电脑端 用户主页实名认证。');
|
||||
window.location.href="/User/Index";
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user