|
@@ -62,6 +62,11 @@ func Send(appKey, appSecret string, param md.PushParam) (string, string, error) |
|
|
return "", "", err |
|
|
return "", "", err |
|
|
} |
|
|
} |
|
|
fmt.Println(string(res)) |
|
|
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() |
|
|
msgId := gjson.Get(string(res), "msg_id").String() |
|
|
if msgId == "0" || msgId == "" { |
|
|
if msgId == "0" || msgId == "" { |
|
|
return "", string(res), err |
|
|
return "", string(res), err |
|
|