mirror of
https://gitee.com/dromara/mayfly-go
synced 2025-11-13 04:40:24 +08:00
12 lines
214 B
Go
12 lines
214 B
Go
package api
|
|
|
|
import (
|
|
"mayfly-go/pkg/captcha"
|
|
"mayfly-go/pkg/req"
|
|
)
|
|
|
|
func GenerateCaptcha(rc *req.Ctx) {
|
|
id, image := captcha.Generate()
|
|
rc.ResData = map[string]interface{}{"base64Captcha": image, "cid": id}
|
|
}
|