From 0af34072ffd3f1168806ef28e4b81aa9b72c1880 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E5=88=98=E5=8D=8E=E6=B8=85?= <18691022700@163.com> Date: Tue, 16 Dec 2025 19:57:36 +0800 Subject: [PATCH] =?UTF-8?q?=E5=AE=9E=E5=90=8D=E8=AE=A4=E8=AF=81=20?= =?UTF-8?q?=E6=9C=AA=E5=AE=8C=E6=88=90=E4=BA=8C=E6=AC=A1=E5=AE=9E=E5=90=8D?= =?UTF-8?q?=E6=95=B0=E6=8D=AE=E4=BF=AE=E6=94=B9?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- application/api/model/UserData.php | 31 ++++++++++++++++++++---------- 1 file changed, 21 insertions(+), 10 deletions(-) diff --git a/application/api/model/UserData.php b/application/api/model/UserData.php index 6b691ecd..f71ff811 100644 --- a/application/api/model/UserData.php +++ b/application/api/model/UserData.php @@ -316,18 +316,29 @@ class UserData extends Model //查询是否已经提交过数据了 $is_real = db::name('user_auth')->where(['card_id' => $id_card,'mobile' =>$user_mobile])->find(); if($is_real){ - return ['code' => 0, 'msg' => '已经审核通过!请勿重复提交!','data' =>null]; + if($is_real['is_real'] == 1){ + return ['code' => 0, 'msg' => '已经审核通过!请勿重复提交!','data' =>null]; + }else{ + $auth = [ + 'mobile' => $user_mobile, + 'real_name' => $real_name, + 'card_id' => $id_card, + 'is_real' => 3, + 'updatetime' => time(), + ]; + db::name('user_auth')->where(['id' => $is_real['id']])->update($auth); + } + }else{ + $auth = [ + 'mobile' => $user_mobile, + 'real_name' => $real_name, + 'card_id' => $id_card, + 'is_real' => 3, + 'createtime' => time(), + ]; + db::name('user_auth')->insert($auth); } - $auth = [ - 'mobile' => $user_mobile, - 'real_name' => $real_name, - 'card_id' => $id_card, - 'is_real' => 3, - 'createtime' => time(), - ]; - db::name('user_auth')->insert($auth); - $config = get_system_config(); //获取Access Token $access_token = $this->redis->get('access_token_'.$config['tencent_app_id']);