Browse Source

Merge branch 'master' of http://git.shengws.com/csx/XT_New

csx 5 years ago
parent
commit
c53ad679df
1 changed files with 14 additions and 14 deletions
  1. 14 14
      controllers/new_mobile_api_controllers/new_login_api_controller.go

+ 14 - 14
controllers/new_mobile_api_controllers/new_login_api_controller.go View File

@@ -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
 }