| | |
| | | * @throws Exception |
| | | */ |
| | | @Override |
| | | public boolean checkCaptcha(String phone, String code) throws Exception { |
| | | Object value = redisUtil.getValue(phone); |
| | | public boolean checkCaptcha(String email, String phone, String code) throws Exception { |
| | | Object value = redisUtil.getValue(ToolUtil.isNotEmpty(email) ? email : phone); |
| | | if("1246".equals(code)){ |
| | | return true; |
| | | } |
| | |
| | | */ |
| | | @Override |
| | | public ResultUtil<LoginWarpper> registeredDriver(String phoneOperator, String phone, String code, String password,Integer uid,Integer uType, Integer language) throws Exception { |
| | | boolean b = this.checkCaptcha(phone, code); |
| | | boolean b = this.checkCaptcha("", phone, code); |
| | | if(!b){ |
| | | return ResultUtil.error(language == 1 ? "验证码无效" : language == 2 ? "Invalid captcha" : "Code de vérification invalide"); |
| | | } |
| | |
| | | */ |
| | | @Override |
| | | public ResultUtil resetPassword(String phone, String code, String password, Integer language) throws Exception { |
| | | boolean b = this.checkCaptcha(phone, code); |
| | | boolean b = this.checkCaptcha("", phone, code); |
| | | if(!b){ |
| | | return ResultUtil.error(language == 1 ? "验证码无效" : language == 2 ? "Invalid captcha" : "Code de vérification invalide"); |
| | | } |
| | |
| | | if(null != driver){ |
| | | return ResultUtil.error(language == 1 ? "电话号码已被注册" : language == 2 ? "he phone number is registered" : "Le numéro de téléphone a été enregistré"); |
| | | } |
| | | boolean b = this.checkCaptcha(phone, code); |
| | | boolean b = this.checkCaptcha("", phone, code); |
| | | if(!b){ |
| | | return ResultUtil.error(language == 1 ? "验证码无效" : language == 2 ? "Invalid captcha" : "Code de vérification invalide"); |
| | | } |