Пример #1
0
 // 自动发送邮件
 @Action(value = "sendEmailRandom")
 public void sendEmailRandom() {
   String ZQS = AuthImg.getNumber(6);
   session.put(Const.SECURITY_CODE, ZQS);
   System.out.println(getParameter("p_flag"));
   succMess =
       userService.sendEmail(model.getEmail(), "您在倍力康商城上的验证码为" + ZQS, getParameter("p_flag"));
   writeStringToResponse(succMess);
 }
Пример #2
0
 // 自动获取手机的验证码
 @Action(value = "sendPhoneRandom")
 public void sendPhoneRandom() throws Exception {
   String ZqsPhoneNum = AuthImg.getNumber(6);
   session.put(Const.SECURITY_CODE, ZqsPhoneNum);
   Map<String, String> params = new HashMap<String, String>();
   params.put("phoneNumber", model.getPhone());
   params.put("securityCode", ZqsPhoneNum);
   params.put("pType", getParameter("p_type"));
   succMess = userService.sendPhone(getParameter("p_flag"), params);
   System.out.println("==============" + succMess);
   writeStringToResponse(succMess);
 }