luokuan 5 gadi atpakaļ
vecāks
revīzija
de832f0b9f

+ 2 - 3
src/main/java/com/yc/education/controller/WxLoginController.java

@@ -275,7 +275,7 @@ public class WxLoginController extends BaseController {
      * @return
      */
     @RequestMapping(value = "send_sms_code", method = {RequestMethod.GET, RequestMethod.POST}, produces = {"application/json;charset=UTF-8"})
-    public AjaxMessage<Object> sendSMS(HttpSession session,
+    public ApiMessage<Object> sendSMS(HttpSession session,
                                        @RequestParam(required = false, defaultValue = "") String phone) throws Exception {
         String sendCoeds = CommonUtil.getRandom(6);//6位验证码
 
@@ -286,12 +286,11 @@ public class WxLoginController extends BaseController {
         String mobile = phone;// 手机号码,多个号码使用","分割
         String content = "【杰冠网络】校验码:" + sendCoeds + "" + ",您正在通过短信验证码登录,请尽快操作!";//短信内容
         HttpSender.batchSend(url, username, pwd, mobile, content);
-
         session.setAttribute("smsCode", sendCoeds);    //设置session中的验证码
         session.setAttribute("smsPhone", phone); //设置session中的电话号
         session.setMaxInactiveInterval(5 * 60);
 
-        return new AjaxMessage<>(true, "success", sendCoeds + ":" + session.getId());
+        return new ApiMessage<>(true, sendCoeds,"短信发送成功" ,session.getId());
     }
 
     /**