From 57b963a5f49e31e435c210857c12f3d711b42366 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E2=80=9Cwanyongkang=E2=80=9D?= <“937888580@qq.com”> Date: Mon, 26 Apr 2021 11:11:40 +0800 Subject: [PATCH] =?UTF-8?q?=E5=AE=9E=E5=90=8D=E8=AE=A4=E8=AF=81?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- alipay/Aliverify.php | 7 +++++-- app/api/controller/Test.php | 9 +++------ 2 files changed, 8 insertions(+), 8 deletions(-) diff --git a/alipay/Aliverify.php b/alipay/Aliverify.php index 4ca2db7..21ac673 100644 --- a/alipay/Aliverify.php +++ b/alipay/Aliverify.php @@ -111,8 +111,11 @@ class Aliverify if($resultCode == 'T'){ $user = new User; $user_data['is_verify'] = 1; - $user->updateOne(['Id'=>$id],$user_data); - return true; + if($user->updateOne(['Id'=>$id],$user_data)){ + return true; + }else { + return false; + } } else { return false; } diff --git a/app/api/controller/Test.php b/app/api/controller/Test.php index c30a827..63d3ce6 100644 --- a/app/api/controller/Test.php +++ b/app/api/controller/Test.php @@ -63,12 +63,9 @@ class Test extends Controller $info = Aliverify::getResult($user_one_info['certify_id'],$this->userinfo['UserId']); $data = []; if($info){ - $user_data['is_verify'] = 1; - if($user->updateOne(['Id'=>$this->userinfo['UserId']],$user_data)){ - $data = [ - 'Code'=>10000 - ]; - } + $data = [ + 'Code'=>10000 + ]; } else { $data = [ 'Code'=>-10000