|
@@ -63,6 +63,8 @@ func (h *SendCodeHandler) run() {
|
|
|
logrus.Errorf("[SendeCodeHandler] call SetSession err:%+v\n", err)
|
|
|
util.HandlerPackErrorResp(h.resp, consts.ErrorInternal, "")
|
|
|
log.Info("SendeCode fail,req:%+v", h.req)
|
|
|
+ h.resp.Status = 40000
|
|
|
+ h.resp.Message = "发送失败,请重试"
|
|
|
return
|
|
|
}
|
|
|
// if data.Email == "login" {
|
|
@@ -89,12 +91,12 @@ func (h *SendCodeHandler) run() {
|
|
|
err = service.SendCode.SetSession(h.ctx, data.Phone, vcode)
|
|
|
if err != nil {
|
|
|
logrus.Errorf("[SendeCodeHandler] call SetSession err:%+v\n", err)
|
|
|
- util.HandlerPackErrorResp(h.resp, consts.ErrorInternal, "")
|
|
|
+ util.HandlerPackErrorResp(h.resp, consts.ErrorInternal, err.Error())
|
|
|
log.Info("SendeCode fail,req:%+v", h.req)
|
|
|
return
|
|
|
}
|
|
|
h.resp.Message = "验证码发送成功,请注意查收"
|
|
|
- h.resp.Status = 200
|
|
|
+ h.resp.Status = 20000
|
|
|
}
|
|
|
func (h *SendCodeHandler) checkParam() error {
|
|
|
return nil
|