|
@@ -2,6 +2,7 @@ package nodes
|
|
|
|
|
|
import (
|
|
|
"encoding/json"
|
|
|
+ "errors"
|
|
|
"fmt"
|
|
|
"github.com/gogf/gf/encoding/gjson"
|
|
|
"github.com/gogf/gf/os/grpool"
|
|
@@ -105,7 +106,11 @@ func (t *TempAlarmNode) newAlarmMessage(message *protocol.Message) error {
|
|
|
if result == nil {
|
|
|
return nil
|
|
|
}
|
|
|
- j := gjson.New(result.Body)
|
|
|
+ req, err := t.client.Do(result)
|
|
|
+ if req == nil {
|
|
|
+ return errors.New("请求出错")
|
|
|
+ }
|
|
|
+ j := gjson.New(req.Response().Body)
|
|
|
fmt.Printf("查询用户信息------------------:%s\r\n", j.MustToJsonString())
|
|
|
dataMap = j.GetMap("data")
|
|
|
fmt.Printf("dataMap------------------:%v\r\n", dataMap)
|