refactor: 将recognizer模块拆分到现有模块中

- 将课表识别功能合并到captcha模块
- 将RecognizerClient添加到client模块
- 将输出函数移至models/output.go
- 更新API结构体添加扩展字段
- 删除recognizer目录
This commit is contained in:
lafay
2026-03-16 13:15:56 +08:00
parent 01ea9ac77d
commit 294151cd40
6 changed files with 287 additions and 323 deletions

View File

@@ -7,14 +7,15 @@ import (
"net/http/cookiejar"
"net/url"
"strings"
"time"
"jwts/config"
)
// 全局HTTP客户端
var Client *http.Client
// 初始化HTTP客户端
var RecognizerClient *http.Client
func InitClient() {
jar, err := cookiejar.New(nil)
if err != nil {
@@ -23,6 +24,10 @@ func InitClient() {
Client = &http.Client{
Jar: jar,
}
RecognizerClient = &http.Client{
Timeout: 120 * time.Second,
}
}
// 设置请求头