| | |
| | | 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(); |
| | | //判断当前手机号是否已经绑定微信 |