Skip to content

Commit

Permalink
refactor🎨: 追加新的验证码返回参数
Browse files Browse the repository at this point in the history
  • Loading branch information
wenjianzhang committed Jan 3, 2024
1 parent 099aab3 commit c1dec45
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions sdk/pkg/captcha/captcha.go
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@ type configJsonBody struct {
DriverDigit *base64Captcha.DriverDigit
}

func DriverStringFunc() (id, b64s string, err error) {
func DriverStringFunc() (id, b64s, answer string, err error) {
e := configJsonBody{}
e.Id = uuid.New().String()
e.DriverString = base64Captcha.NewDriverString(46, 140, 2, 2, 4, "234567890abcdefghjkmnpqrstuvwxyz", &color.RGBA{240, 240, 246, 246}, nil, []string{"wqy-microhei.ttc"})
Expand All @@ -33,7 +33,7 @@ func DriverStringFunc() (id, b64s string, err error) {
return captcha.Generate()
}

func DriverDigitFunc() (id, b64s string, err error) {
func DriverDigitFunc() (id, b64s, answer string, err error) {
e := configJsonBody{}
e.Id = uuid.New().String()
e.DriverDigit = base64Captcha.NewDriverDigit(80, 240, 4, 0.7, 80)
Expand Down

0 comments on commit c1dec45

Please sign in to comment.