This commit is contained in:
suyl
2021-07-14 10:25:11 +08:00
parent 7e00b58050
commit c6f7f00daa
2 changed files with 17 additions and 3 deletions

View File

@@ -51,9 +51,8 @@ func RandStringBytesWithNumber(n int) string {
return string(b)
}
func Captcha(c *gin.Context, length ...int) {
func Captcha(c *gin.Context, w, h int, length ...int) {
l := captcha.DefaultLen
w, h := 107, 36
if len(length) == 1 {
l = length[0]
}