From 4c40050ea35bd1ebb9f71350ff0f29c5a1c82e28 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 Sep 2025 20:50:05 +0800 Subject: [PATCH] =?UTF-8?q?=E5=85=85=E5=80=BC=E5=8D=A1=E5=AE=9E=E5=90=8D?= =?UTF-8?q?=E5=92=8C=E6=88=90=E5=B9=B4?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- application/api/controller/Payment.php | 14 ++++++++++++++ 1 file changed, 14 insertions(+) diff --git a/application/api/controller/Payment.php b/application/api/controller/Payment.php index f6a82a5..419d613 100644 --- a/application/api/controller/Payment.php +++ b/application/api/controller/Payment.php @@ -32,6 +32,20 @@ class Payment extends Controller if (!$user_id) { return V(0, '请选择充值用户', null); } + //获取用户的手机号 + $user_phone = db::name('user')->where(["id" => $user_id])->value('mobile'); + if(!$user_phone){ + return V(0, '请先绑定手机号!', null); + } + //获取用户的实名信息 + $real_name = db::name('user_auth')->where(["mobile" => $user_phone,'is_real' => 1])->find(); + if(!$real_name){ + return V(0, '请先实名认证', null); + } + //获取用户的年龄 + if(!getAgeId($real_name['card_id'])){ + return V(0, '未成年不可充值!', null); + } if (!is_numeric($money) || floor($money) != $money || $money <= 0 || $money >= 2000) { return V(0, '请选择正确的充值金额', null);