支持短信验证码登录

This commit is contained in:
lifenlong 2021-05-26 17:57:51 +08:00
parent f82fef9f3d
commit 5b5681d748

View File

@ -63,11 +63,11 @@ public class MemberBuyerController {
public ResultMessage<Object> smsLogin(@NotNull(message = "手机号为空") @RequestParam String mobile,
@NotNull(message = "验证码为空") @RequestParam String code,
@RequestHeader String uuid) {
// if(smsUtil.verifyCode(mobile,VerificationEnums.LOGIN,uuid,code)){
if(smsUtil.verifyCode(mobile,VerificationEnums.LOGIN,uuid,code)){
return ResultUtil.data(memberService.mobilePhoneLogin(mobile));
// }else {
// throw new ServiceException("验证码错误");
// }
}else {
throw new ServiceException("验证码错误");
}
}
@ApiOperation(value = "注册用户")