From 4acf2a64459957cf271c3d38e1dc8f2bf5ed376c Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E2=80=9Cwanyongkang=E2=80=9D?= <“937888580@qq.com”> Date: Wed, 29 May 2024 14:03:28 +0800 Subject: [PATCH] =?UTF-8?q?=E8=AE=A4=E8=AF=81=E7=BB=93=E6=9E=9C?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- app/realname/controller/Publicget.php | 45 +++++++++++++-------------- 1 file changed, 21 insertions(+), 24 deletions(-) diff --git a/app/realname/controller/Publicget.php b/app/realname/controller/Publicget.php index 7d206dd..9d843c5 100644 --- a/app/realname/controller/Publicget.php +++ b/app/realname/controller/Publicget.php @@ -20,10 +20,8 @@ class Publicget $id_code = $_GET['id_code']; - $user = new User; - $user_one_info = $user->getNewOne(['id_code'=>$id_code]); - + $user_one_info = $user->getNewOne('certify_id,Id',['id_code'=>$id_code]); $client = new CloudauthClient([ @@ -32,33 +30,32 @@ class Publicget 'scheme' => 'http' ]); - try{ - $res = $client->GetAliveResult([ - 'token' => $user_one_info['certify_id'], - ]); - if ($res['result']['h5Result'] == 'ok' && $res['result']['smResult'] == 'ok' && $res['result']['rxResult'] == 'ok') { + $res = $client->GetAliveResult([ + 'token' => $user_one_info['certify_id'], + ]); + + if ($res['result']['h5Result'] == 'ok' && $res['result']['smResult'] == 'ok' && $res['result']['rxResult'] == 'ok') { - $update_one = [ - 'is_verify' => 1 - ]; - $user->updateOne(['Id'=>$user_one_info['Id']],$update_one); + $update_one = [ + 'is_verify' => 1 + ]; + $user->updateOne(['Id'=>$user_one_info['Id']],$update_one); - echo '

实名认证成功


'; + echo '

实名认证成功


'; - echo "页面将在5秒后自动跳转...
"; + echo "页面将在5秒后自动跳转...
"; - echo "如果没有跳转,请点这里跳转"; + echo "如果没有跳转,请点这里跳转"; - header("Refresh: 5; url=https://www.juip.com/User/Index"); - die; - } else { - echo '

'.$res['result']['desc'].'


'; - } - }catch (\Jdcloud\Exception\JdcloudException $e) { - print("ERROR"); - var_dump($e->getMessage()); - $this->assertFalse(true); + header("Refresh: 5; url=https://www.juip.com/User/Index"); + die; + } else { + echo '

'.$res['result']['desc'].'


'; + } + + if (!isset($res['result']) ) { + echo "

实名认证超时,请重新认证


"; } }