1
This commit is contained in:
@@ -68,3 +68,7 @@ func TestImDecpryt(t *testing.T) {
|
|||||||
fmt.Println(reflect.TypeOf(res))
|
fmt.Println(reflect.TypeOf(res))
|
||||||
fmt.Println(string(res))
|
fmt.Println(string(res))
|
||||||
}
|
}
|
||||||
|
|
||||||
|
func TestRand(t *testing.T) {
|
||||||
|
fmt.Println(time.Now().Unix())
|
||||||
|
}
|
||||||
|
|||||||
@@ -5,7 +5,6 @@ import (
|
|||||||
"errors"
|
"errors"
|
||||||
"fmt"
|
"fmt"
|
||||||
"git.rosy.net.cn/baseapi/utils"
|
"git.rosy.net.cn/baseapi/utils"
|
||||||
"git.rosy.net.cn/jx-callback/globals"
|
|
||||||
"net/http"
|
"net/http"
|
||||||
"strings"
|
"strings"
|
||||||
)
|
)
|
||||||
@@ -28,7 +27,6 @@ func (a *API) SendMsgByUinApp(parma map[string]interface{}) error {
|
|||||||
data, _ := json.Marshal(parma)
|
data, _ := json.Marshal(parma)
|
||||||
fmt.Println(string(data))
|
fmt.Println(string(data))
|
||||||
result, err := a.AccessAPI(BaseUrl+a.appId, PushMsgByCid, http.MethodPost, parma)
|
result, err := a.AccessAPI(BaseUrl+a.appId, PushMsgByCid, http.MethodPost, parma)
|
||||||
globals.SugarLogger.Debugf("SendMsgByUinApp result=%s", utils.Format4Output(result, false))
|
|
||||||
if err != nil && !strings.Contains(err.Error(), "success") {
|
if err != nil && !strings.Contains(err.Error(), "success") {
|
||||||
return err
|
return err
|
||||||
}
|
}
|
||||||
@@ -37,7 +35,6 @@ func (a *API) SendMsgByUinApp(parma map[string]interface{}) error {
|
|||||||
if err := utils.Map2StructByJson(result, &sendMsgRes, false); err != nil {
|
if err := utils.Map2StructByJson(result, &sendMsgRes, false); err != nil {
|
||||||
return err
|
return err
|
||||||
}
|
}
|
||||||
globals.SugarLogger.Debugf("SendMsgByUinApp sendMsgRes=%s", utils.Format4Output(sendMsgRes, false))
|
|
||||||
if sendMsgRes.Code != 0 {
|
if sendMsgRes.Code != 0 {
|
||||||
return errors.New(sendMsgRes.Msg)
|
return errors.New(sendMsgRes.Msg)
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user