2021-09-11 14:04:09 +08:00
|
|
|
package api
|
2021-07-28 18:03:19 +08:00
|
|
|
|
|
|
|
|
import (
|
|
|
|
|
"mayfly-go/base/captcha"
|
|
|
|
|
"mayfly-go/base/ctx"
|
|
|
|
|
)
|
|
|
|
|
|
|
|
|
|
func GenerateCaptcha(rc *ctx.ReqCtx) {
|
|
|
|
|
id, image := captcha.Generate()
|
|
|
|
|
rc.ResData = map[string]interface{}{"base64Captcha": image, "cid": id}
|
|
|
|
|
}
|