zhaojs
2023-06-14 67fe8e754219d9d810850cc162d41547d2742b99
no message
已修改1个文件
13 ■■■■■ 文件已修改
application/api/controller/User.php 13 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
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();
        //判断当前手机号是否已经绑定微信