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