|
|
@@ -62,6 +62,11 @@ func Send(appKey, appSecret string, param md.PushParam) (string, string, error) |
|
|
|
return "", "", err |
|
|
|
} |
|
|
|
fmt.Println(string(res)) |
|
|
|
code := gjson.Get(string(res), "error.code").Int() |
|
|
|
if code > 0 { |
|
|
|
message := gjson.Get(string(res), "error.message").String() |
|
|
|
return "", string(res), errors.New(message) |
|
|
|
} |
|
|
|
msgId := gjson.Get(string(res), "msg_id").String() |
|
|
|
if msgId == "0" || msgId == "" { |
|
|
|
return "", string(res), err |
|
|
|