diff --git a/dsSzxy/.idea/workspace.xml b/dsSzxy/.idea/workspace.xml
index edb1f502..4c1c6859 100644
--- a/dsSzxy/.idea/workspace.xml
+++ b/dsSzxy/.idea/workspace.xml
@@ -7,8 +7,6 @@
-
-
diff --git a/dsSzxy/Business/CaptchaRelate/CaptchaController/CaptchaController.go b/dsSzxy/Business/CaptchaRelate/CaptchaController/CaptchaController.go
index af4d390a..61dc673f 100644
--- a/dsSzxy/Business/CaptchaRelate/CaptchaController/CaptchaController.go
+++ b/dsSzxy/Business/CaptchaRelate/CaptchaController/CaptchaController.go
@@ -8,6 +8,7 @@ import (
"gitee.com/aesoper/captchaStore"
"github.com/gin-gonic/gin"
"github.com/mojocn/base64Captcha"
+ "image/color"
"net/http"
"time"
)
@@ -56,13 +57,32 @@ var store *captchaStore.CustomCaptchaStore
// CaptMake 生成验证码
func CaptMake() (string, string) {
// 生成默认数字
- driver := &base64Captcha.DriverDigit{
- Height: 100,
- Width: 200,
- Length: 4,
- MaxSkew: 1,
- DotCount: 2,
+ //driver := &base64Captcha.DriverDigit{
+ // Height: 100,
+ // Width: 200,
+ // Length: 4,
+ // MaxSkew: 1,
+ // DotCount: 2,
+ //}
+ //https://captcha.mojotv.cn/
+
+ //四则运算
+ driver := &base64Captcha.DriverMath{
+ Height: 60,
+ Width: 240,
+ NoiseCount: 0,
+ BgColor: &color.RGBA{
+ R: 52,
+ G: 56,
+ B: 98,
+ A: 58,
+ },
+ Fonts: []string{"wqy-microhei.ttc"},
}
+ driver.ConvertFonts()
+
+ //中文
+
// 生成base64图片
c, err := cache.New(cache.Cfg{
Driver: "redis",
diff --git a/dsSzxy/fonts/3Dumb.ttf b/dsSzxy/fonts/3Dumb.ttf
new file mode 100644
index 00000000..978409ae
Binary files /dev/null and b/dsSzxy/fonts/3Dumb.ttf differ
diff --git a/dsSzxy/fonts/ApothecaryFont.ttf b/dsSzxy/fonts/ApothecaryFont.ttf
new file mode 100644
index 00000000..4008f803
Binary files /dev/null and b/dsSzxy/fonts/ApothecaryFont.ttf differ
diff --git a/dsSzxy/fonts/Comismsh.ttf b/dsSzxy/fonts/Comismsh.ttf
new file mode 100644
index 00000000..0c4a3846
Binary files /dev/null and b/dsSzxy/fonts/Comismsh.ttf differ
diff --git a/dsSzxy/fonts/DENNEthree-dee.ttf b/dsSzxy/fonts/DENNEthree-dee.ttf
new file mode 100644
index 00000000..0350b4d3
Binary files /dev/null and b/dsSzxy/fonts/DENNEthree-dee.ttf differ
diff --git a/dsSzxy/fonts/DeborahFancyDress.ttf b/dsSzxy/fonts/DeborahFancyDress.ttf
new file mode 100644
index 00000000..bf94532b
Binary files /dev/null and b/dsSzxy/fonts/DeborahFancyDress.ttf differ
diff --git a/dsSzxy/fonts/Flim-Flam.ttf b/dsSzxy/fonts/Flim-Flam.ttf
new file mode 100644
index 00000000..37ce4c15
Binary files /dev/null and b/dsSzxy/fonts/Flim-Flam.ttf differ
diff --git a/dsSzxy/fonts/RitaSmith.ttf b/dsSzxy/fonts/RitaSmith.ttf
new file mode 100644
index 00000000..60ddb728
Binary files /dev/null and b/dsSzxy/fonts/RitaSmith.ttf differ
diff --git a/dsSzxy/fonts/actionj.ttf b/dsSzxy/fonts/actionj.ttf
new file mode 100644
index 00000000..8439247f
Binary files /dev/null and b/dsSzxy/fonts/actionj.ttf differ
diff --git a/dsSzxy/fonts/chromohv.ttf b/dsSzxy/fonts/chromohv.ttf
new file mode 100644
index 00000000..52ce0da6
Binary files /dev/null and b/dsSzxy/fonts/chromohv.ttf differ
diff --git a/dsSzxy/fonts/readme.md b/dsSzxy/fonts/readme.md
new file mode 100644
index 00000000..862f8715
--- /dev/null
+++ b/dsSzxy/fonts/readme.md
@@ -0,0 +1,7 @@
+go get -u github.com/jteeuwen/go-bindata/...
+
+go-bindata fonts
+sed -i "s/package main/package base64Captcha/g" bindata.go
+
+
+https://github.com/jteeuwen/go-bindata
\ No newline at end of file
diff --git a/dsSzxy/fonts/wqy-microhei.ttc b/dsSzxy/fonts/wqy-microhei.ttc
new file mode 100644
index 00000000..2c9bc2d4
Binary files /dev/null and b/dsSzxy/fonts/wqy-microhei.ttc differ