From 21bc807473315a618297d8d3bf8c210b26d78396 Mon Sep 17 00:00:00 2001 From: aarongao Date: Mon, 3 Feb 2020 14:55:57 +0800 Subject: [PATCH] 验证钟 --- API/Sms.go | 4 ++-- README.md | 2 +- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/API/Sms.go b/API/Sms.go index e472a5f..28e4074 100644 --- a/API/Sms.go +++ b/API/Sms.go @@ -16,7 +16,7 @@ import ( // @Produce json // @Param Mobile 18616619599 string true "手机号" // @Param Location {"Latitude": 119, "Longitude": 39} string true "位置" -// @Success 200 {object} tools.ResponseSeccess "{"errcode":0,"result":"ok"}验证码3分钟内有效" +// @Success 200 {object} tools.ResponseSeccess "{"errcode":0,"result":"ok"}验证码1分钟内有效" // @Failure 500 {object} tools.ResponseError "{"errcode":1,"errmsg":"错误原因"}" // @Router /Sms/Send? [post] func Send(c *gin.Context) { @@ -67,7 +67,7 @@ func Send(c *gin.Context) { } else { reserr = response.Code if response.Code == "OK" { - DB.Redis.Set(c.PostForm("Mobile"), code, time.Second*60*3) + DB.Redis.Set(c.PostForm("Mobile"), code, time.Second*60) } } diff --git a/README.md b/README.md index b9f4623..8437091 100644 --- a/README.md +++ b/README.md @@ -316,7 +316,7 @@ | Code | Type | Model | Message | |-----|-----|-----|-----| -| 200 | object | [ResponseSeccess](#github.com.aarongao.tools.ResponseSeccess) | {"errcode":0,"result":"ok"}验证码3分钟内有效 | +| 200 | object | [ResponseSeccess](#github.com.aarongao.tools.ResponseSeccess) | {"errcode":0,"result":"ok"}验证码1分钟内有效 | | 500 | object | [ResponseError](#github.com.aarongao.tools.ResponseError) | {"errcode":1,"errmsg":"错误原因"} | -- libgit2 0.21.0