From 05bdba6a3cfb9c607fef5b80f4f1a77074378884 Mon Sep 17 00:00:00 2001 From: zhaojs <349234519@qq.com> Date: 星期二, 04 七月 2023 10:22:28 +0800 Subject: [PATCH] no message --- application/api/controller/User.php | 21 +++++++++++---------- 1 files changed, 11 insertions(+), 10 deletions(-) diff --git a/application/api/controller/User.php b/application/api/controller/User.php index a281c3e..e2789af 100644 --- a/application/api/controller/User.php +++ b/application/api/controller/User.php @@ -214,7 +214,8 @@ $user = $this->auth->getUser(); $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}$")) { @@ -248,7 +249,6 @@ { $openid = request()->param('openid'); $access_token = request()->param('access_token'); - $push_cid=request()->param('push_cid',''); $LogicUser = new LogicUser(); $userId = $LogicUser->getUserByOpenId($openid); if ($userId) { @@ -256,10 +256,6 @@ if(empty($user)) $this->error("鐢ㄦ埛淇℃伅鑾峰彇澶辫触"); if ($user['status'] != 'normal') { $this->error(__('Account is locked')); - } - if(!empty($push_cid)&&empty($user['push_cid'])) - {//琛ㄩ噷push_cid涓虹┖锛岃ˉ鍏╬ush_cid - } //濡傛灉宸茬粡鏈夎处鍙峰垯鐩存帴鐧诲綍 $ret = $this->auth->direct($user['id']); @@ -290,16 +286,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