|
@@ -517,19 +517,19 @@ func (this *NewLoginApiController) GetCode() {
|
517
|
517
|
return
|
518
|
518
|
}
|
519
|
519
|
|
520
|
|
- this.Data["json"] = enums.MakeSuccessResponseJSON(map[string]interface{}{
|
521
|
|
- "msg": "短信发送成功,有效期为10分钟",
|
522
|
|
- })
|
523
|
|
- this.ServeJSON()
|
524
|
|
-
|
525
|
|
- //if err := service.SendVerificationCodeSMS(mobile, aespass); err != nil {
|
526
|
|
- // this.Data["json"] = enums.MakeFailResponseJSON(err.Error(), 600)
|
527
|
|
- // this.ServeJSON()
|
528
|
|
- //} else {
|
529
|
|
- // this.Data["json"] = enums.MakeSuccessResponseJSON(map[string]interface{}{
|
530
|
|
- // "msg": "短信发送成功,有效期为10分钟",
|
531
|
|
- // })
|
532
|
|
- // this.ServeJSON()
|
533
|
|
- //}
|
|
520
|
+ //this.Data["json"] = enums.MakeSuccessResponseJSON(map[string]interface{}{
|
|
521
|
+ // "msg": "短信发送成功,有效期为10分钟",
|
|
522
|
+ //})
|
|
523
|
+ //this.ServeJSON()
|
|
524
|
+
|
|
525
|
+ if err := service.SendVerificationCodeSMS(mobile, aespass); err != nil {
|
|
526
|
+ this.Data["json"] = enums.MakeFailResponseJSON(err.Error(), 600)
|
|
527
|
+ this.ServeJSON()
|
|
528
|
+ } else {
|
|
529
|
+ this.Data["json"] = enums.MakeSuccessResponseJSON(map[string]interface{}{
|
|
530
|
+ "msg": "短信发送成功,有效期为10分钟",
|
|
531
|
+ })
|
|
532
|
+ this.ServeJSON()
|
|
533
|
+ }
|
534
|
534
|
|
535
|
535
|
}
|