refactor(workers): 移除调试打印语句以优化代码

This commit is contained in:
liyp 2024-08-31 21:21:06 +08:00
parent c8b6c5ea20
commit 55479c5869

View file

@ -172,9 +172,9 @@ func (s *StdAns) SendMsg(msg string) bool {
url := cfg["POSTURL"].(string) + "/send_msg"
// println("core:", url)
// fmt.Println("请求地址:", url)
fmt.Println("响应信息:\n", msg)
// fmt.Println("响应信息:\n", msg)
request := gorequest.New()
resp, body, errs := request.Post(url).
resp, _, errs := request.Post(url).
Set("Content-Type", "application/json").
Send(string(requestBody)).End()
if len(errs) > 0 {
@ -184,7 +184,7 @@ func (s *StdAns) SendMsg(msg string) bool {
}
defer resp.Body.Close()
// res, _ := io.ReadAll(resp.Body)
fmt.Println("响应返回:", body)
// fmt.Println("响应返回:", body)
return true
}
@ -208,7 +208,7 @@ func (s *StdAns) GetImage(file string) string {
fmt.Println("解析JSON失败:", err)
return ""
}
fmt.Println("url:", url)
// fmt.Println("url:", url)
path, ok := data["data"].(map[string]interface{})["file"].(string)
if !ok {
return ""