rdluck 4 years ago
parent
commit
9041a37b6a
1 changed files with 2 additions and 2 deletions
  1. 2 2
      controllers/user.go

+ 2 - 2
controllers/user.go

@@ -86,7 +86,7 @@ func (this *UserCommonController) GetSmsCode() {
 		item.OpenId = ""
 		item.Code = msgCode
 		item.Mobile = mobile
-		item.ExpiredIn = time.Now().Add(15*60).Unix()
+		item.ExpiredIn = time.Now().Add(15*time.Minute).Unix()
 		item.Enabled = 1
 		item.CreatedTime=time.Now()
 		err := models.AddMsgCode(item)
@@ -187,7 +187,7 @@ func (this *UserCommonController) GetEmailCode() {
 		item.OpenId = ""
 		item.Code = msgCode
 		item.Mobile = email
-		item.ExpiredIn = time.Now().Add(15*60).Unix()
+		item.ExpiredIn = time.Now().Add(15*time.Minute).Unix()
 		item.Enabled = 1
 		item.CreatedTime=time.Now()
 		err := models.AddMsgCode(item)