From c0c243af0e45b0ed9062b8ca0b8a4a97d9540213 Mon Sep 17 00:00:00 2001 From: lqmac Date: Thu, 2 Nov 2023 22:12:51 +0800 Subject: [PATCH] 1 --- application/api/controller/User.php | 10 ++++++++++ 1 file changed, 10 insertions(+) diff --git a/application/api/controller/User.php b/application/api/controller/User.php index f574472..4328649 100755 --- a/application/api/controller/User.php +++ b/application/api/controller/User.php @@ -286,6 +286,16 @@ class User extends Api if (isset($params['avatar']) && $params['avatar']) { $upData['avatar'] = $params['avatar']; } + if ((isset($params['bank_realname']) && $params['bank_realname'] ) || (isset($params['wechat_image']) && $params['wechat_image']) || (isset($params['alipay_image']) && $params['alipay_image'])) { + if (isset($params['code']) && $params['code']) { + $user = $this->auth->getUserinfo(); + $ret = Sms::check($user['mobile'], $params['code'], 'notice'); + if (!$ret) { + $this->error(__('Captcha is incorrect')); + } + } + + } if (!$upData) { $this->success(); }