mirror of
https://gitee.com/dromara/mayfly-go
synced 2025-11-14 21:30:26 +08:00
refactor: 新增base.Repo与base.App,重构repo与app层代码
This commit is contained in:
@@ -1,12 +1,14 @@
|
||||
package api
|
||||
|
||||
import (
|
||||
"mayfly-go/pkg/biz"
|
||||
"mayfly-go/pkg/captcha"
|
||||
"mayfly-go/pkg/req"
|
||||
"mayfly-go/pkg/utils/collx"
|
||||
)
|
||||
|
||||
func GenerateCaptcha(rc *req.Ctx) {
|
||||
id, image := captcha.Generate()
|
||||
id, image, err := captcha.Generate()
|
||||
biz.ErrIsNilAppendErr(err, "获取验证码错误: %s")
|
||||
rc.ResData = collx.M{"base64Captcha": image, "cid": id}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user