From 67fe8e754219d9d810850cc162d41547d2742b99 Mon Sep 17 00:00:00 2001
From: zhaojs <349234519@qq.com>
Date: 星期三, 14 六月 2023 16:43:05 +0800
Subject: [PATCH] no message

---
 application/api/controller/User.php |   13 +++++++++----
 1 files changed, 9 insertions(+), 4 deletions(-)

diff --git a/application/api/controller/User.php b/application/api/controller/User.php
index ddd822d..ca225c3 100644
--- a/application/api/controller/User.php
+++ b/application/api/controller/User.php
@@ -284,16 +284,21 @@
         if(empty($wxUser)) $this->error('寰俊鎺堟潈淇℃伅鑾峰彇澶辫触');
         $mobile = $this->request->post('mobile');
         $captcha = $this->request->post('captcha');
-        if (!$mobile || !$captcha) {
+        $isyj=$this->request->post('isyj',false);
+        if (!$mobile || (!$isyj&&!$captcha)) {
             $this->error(__('Invalid parameters'));
         }
         if (!Validate::regex($mobile, "^1\d{10}$")) {
             $this->error('璇疯緭鍏ユ纭墜鏈哄彿');
         }
-        $result = Sms::check($mobile, $captcha, 'changemobile');
-        if (!$result) {
-            $this->error(__('Captcha is incorrect'));
+        if(!$isyj)
+        {
+            $result = Sms::check($mobile, $captcha, 'changemobile');
+            if (!$result) {
+                $this->error(__('Captcha is incorrect'));
+            }
         }
+        
         $ModelThird = new ModelThird();
         $LogicUser = new LogicUser();
         //鍒ゆ柇褰撳墠鎵嬫満鍙锋槸鍚﹀凡缁忕粦瀹氬井淇�

--
Gitblit v1.9.3