You cannot select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

112 lines
3.9 KiB
HTML

<extend name="Public/bases" />
<block name="body" >
<link href="__CSS__/user.css" rel="stylesheet" >
<body class="">
<header class="header">
<div class="">
<a href="{:U('User/userset')}" class="hbtn back"><i class="iconfont icon-drop-left"></i></a>
<h1 class="caption">实名认证</h1>
</div>
</header>
<div class="occupy"></div>
<section class="trunker">
<section class="container">
<if condition='$user["age_status"] lt 2'>
<form id='form' action="" method="post" class="">
<div class="t-table user-auth-list">
<ul class="table clearfix">
<li class="table-row">
<span class="table-cell">真实姓名</span>
<span class="table-cell">
<input type="text" class="txt" id='real_name' name="real_name" value="{$user['real_name']}" placeholder="请如实填写" minlength="2">
</span>
</li>
<li class="table-row">
<span class="table-cell">证件号码</span>
<span class="table-cell">
<input type="text" class="txt" id='idcard' name="idcard" value="{$user['idcard']}" placeholder="请填写身份证号" maxlength="18">
</span>
</li>
</ul>
</div>
<div class="btnbox user-set-btnbox">
<input type="button" class="btn jssubmit" value="提交">
</div>
</form>
<elseif condition="$user['third_authentication'] eq 1" />
<span class="user-auth-list-title">您已进行过支付宝实名认证</span>
<else/>
<form action="" method="post" class="">
<div class="t-table user-auth-list">
<span class="user-auth-list-title">您已进行过实名认证</span>
<ul class="table clearfix">
<li class="table-row"><span class="table-cell">真实姓名</span><span class="table-cell">{:substr_cut($user['real_name'],'*')}</span></li>
<li class="table-row"><span class="table-cell">证件号码</span><span class="table-cell">{:substr_replace($user['idcard'],'****************',1,16)}</span></li>
</ul>
</div>
</form>
</if>
</section>
</section>
<div class="popmsg pop-dialog"></div>
<script src="__JS__/pop.lwx.min.js"></script>
<script src="__STATIC__/isCardID.js"></script>
<script>
$(function() {
$('.jssubmit').click(function() {
var real_name = $.trim($('#real_name').val());
var idcard = $.trim($('#idcard').val());
var pmsg = $('.popmsg').pop();
if(real_name == ""){
pmsg.msg("请输入真实姓名");
$('#real_name').focus();
return false;
}
if(idcard.length == 0){
pmsg.msg("身份证号码不能为空");
$('#idcard').focus();
return false;
}
if(real_name.length <2){
pmsg.msg("真实姓名必须大于两个字");
$('#real_name').focus();
return false;
}
var reg = /^[\u4E00-\u9FA5]+$/;
if(reg.test(real_name) == false){
pmsg.msg("输入姓名不合法");
$('#real_name').focus();
return false;
}
$.ajax({
cache:true,
type:'post',
url:"{:U('User/userauth')}",
data:$('#form').serialize(),
dataType:'json',
success:function(result){
pmsg.msg(result.info);
if(result.url !=''){
setTimeout(function () {
window.location.href = result.url;
}, 2000);
}
},
error:function(){
alert("错误")
}
})
});
});
</script>
</body>
</block>