|
|
|
@ -1021,23 +1021,39 @@ class UserController extends BaseController
|
|
|
|
|
if ($status == 0) {
|
|
|
|
|
$this->ajaxReturn(array('status' => 0, 'info' => '实名认证暂未开启!', 'url' => U('User/userauth')));
|
|
|
|
|
} else {
|
|
|
|
|
$re =age_verify($_REQUEST['idcard'],$_REQUEST['real_name']);
|
|
|
|
|
if ($re == 0) {
|
|
|
|
|
$this->ajaxReturn(array('status' => 0, 'info' => '审核失败!', 'url' => U('User/userauth')));
|
|
|
|
|
}
|
|
|
|
|
if ($re == -1) {
|
|
|
|
|
$this->ajaxReturn(array('status' => 0, 'info' => '短信数量已使用完!', 'url' => U('User/userauth')));
|
|
|
|
|
}
|
|
|
|
|
if ($re == -2) {
|
|
|
|
|
$this->ajaxReturn(array('status' => 0, 'info' => '连接错误,请检查配置!', 'url' => U('User/userauth')));
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
if ($re == 1) {
|
|
|
|
|
$resdata = 2;//成年
|
|
|
|
|
}
|
|
|
|
|
if ($re == 2) {
|
|
|
|
|
$resdata = 3;//未成年
|
|
|
|
|
//PC_REAL_NAME_REGISTER
|
|
|
|
|
$ages = M("Config")->where("name = 'PC_REAL_NAME_REGISTER'")->field("status")->find()['status'];
|
|
|
|
|
if($ages == 1){
|
|
|
|
|
$re =age_verify($_REQUEST['idcard'],$_REQUEST['real_name']);
|
|
|
|
|
if ($re == 0) {
|
|
|
|
|
$this->ajaxReturn(array('status' => 0, 'info' => '审核失败!', 'url' => U('User/userauth')));
|
|
|
|
|
}
|
|
|
|
|
if ($re == -1) {
|
|
|
|
|
$this->ajaxReturn(array('status' => 0, 'info' => '短信数量已使用完!', 'url' => U('User/userauth')));
|
|
|
|
|
}
|
|
|
|
|
if ($re == "202") {
|
|
|
|
|
$this->ajaxReturn(array('status' => 0, 'info' => '无法验证!【中心中无此身份证记录,军人转业,户口迁移等】', 'url' => U('User/userauth')));
|
|
|
|
|
}
|
|
|
|
|
if ($re == "203") {
|
|
|
|
|
$this->ajaxReturn(array('status' => 0, 'info' => '异常情况!', 'url' => U('User/userauth')));
|
|
|
|
|
}
|
|
|
|
|
if ($re == "204") {
|
|
|
|
|
$this->ajaxReturn(array('status' => 0, 'info' => '姓名格式不正确!', 'url' => U('User/userauth')));
|
|
|
|
|
}
|
|
|
|
|
if ($re == "205") {
|
|
|
|
|
$this->ajaxReturn(array('status' => 0, 'info' => '身份证格式不正确!', 'url' => U('User/userauth')));
|
|
|
|
|
}
|
|
|
|
|
if ($re == 1) {
|
|
|
|
|
$resdata = 2;//成年
|
|
|
|
|
}
|
|
|
|
|
if ($re == 2) {
|
|
|
|
|
$resdata = 3;//未成年
|
|
|
|
|
}
|
|
|
|
|
}else{
|
|
|
|
|
$re = 2;
|
|
|
|
|
$resdata = 2;
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
}
|
|
|
|
|
if ($re > 0) {
|
|
|
|
|
$model = D('User')->where($map)->save(array('real_name' => $_REQUEST['real_name'], 'idcard' => $_REQUEST['idcard'], 'age_status' => $resdata));
|
|
|
|
|