refactor(workers): 移除调试打印语句以优化代码
This commit is contained in:
parent
c8b6c5ea20
commit
55479c5869
1 changed files with 4 additions and 4 deletions
|
@ -172,9 +172,9 @@ func (s *StdAns) SendMsg(msg string) bool {
|
||||||
url := cfg["POSTURL"].(string) + "/send_msg"
|
url := cfg["POSTURL"].(string) + "/send_msg"
|
||||||
// println("core:", url)
|
// println("core:", url)
|
||||||
// fmt.Println("请求地址:", url)
|
// fmt.Println("请求地址:", url)
|
||||||
fmt.Println("响应信息:\n", msg)
|
// fmt.Println("响应信息:\n", msg)
|
||||||
request := gorequest.New()
|
request := gorequest.New()
|
||||||
resp, body, errs := request.Post(url).
|
resp, _, errs := request.Post(url).
|
||||||
Set("Content-Type", "application/json").
|
Set("Content-Type", "application/json").
|
||||||
Send(string(requestBody)).End()
|
Send(string(requestBody)).End()
|
||||||
if len(errs) > 0 {
|
if len(errs) > 0 {
|
||||||
|
@ -184,7 +184,7 @@ func (s *StdAns) SendMsg(msg string) bool {
|
||||||
}
|
}
|
||||||
defer resp.Body.Close()
|
defer resp.Body.Close()
|
||||||
// res, _ := io.ReadAll(resp.Body)
|
// res, _ := io.ReadAll(resp.Body)
|
||||||
fmt.Println("响应返回:", body)
|
// fmt.Println("响应返回:", body)
|
||||||
return true
|
return true
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -208,7 +208,7 @@ func (s *StdAns) GetImage(file string) string {
|
||||||
fmt.Println("解析JSON失败:", err)
|
fmt.Println("解析JSON失败:", err)
|
||||||
return ""
|
return ""
|
||||||
}
|
}
|
||||||
fmt.Println("url:", url)
|
// fmt.Println("url:", url)
|
||||||
path, ok := data["data"].(map[string]interface{})["file"].(string)
|
path, ok := data["data"].(map[string]interface{})["file"].(string)
|
||||||
if !ok {
|
if !ok {
|
||||||
return ""
|
return ""
|
||||||
|
|
Loading…
Reference in a new issue