1
This commit is contained in:
@@ -2,6 +2,7 @@ package jdshopapi
|
||||
|
||||
import (
|
||||
"encoding/json"
|
||||
"git.rosy.net.cn/jx-callback/globals"
|
||||
"io/ioutil"
|
||||
"net/http"
|
||||
|
||||
@@ -71,6 +72,7 @@ func (a *API) GetCallbackMsg(request *http.Request) (call *CallBackResult, err e
|
||||
return nil, err
|
||||
}
|
||||
values, err := utils.HTTPBody2Values(data, false)
|
||||
globals.SugarLogger.Debugf("------test GetCallbackMsg := %s", utils.Format4Output(data, false))
|
||||
if err != nil {
|
||||
return nil, err
|
||||
}
|
||||
|
||||
@@ -5,6 +5,7 @@ import (
|
||||
"fmt"
|
||||
"git.rosy.net.cn/baseapi/utils"
|
||||
"testing"
|
||||
"time"
|
||||
)
|
||||
|
||||
func TestSignRSA(t *testing.T) {
|
||||
@@ -124,3 +125,8 @@ func TestTLTLQueryTerm(t *testing.T) {
|
||||
}
|
||||
api.TLQueryTerm(param)
|
||||
}
|
||||
|
||||
func Test111(t *testing.T) {
|
||||
aa := time.Since(time.Now().AddDate(0, 0, -5)) > 7*24*time.Hour
|
||||
fmt.Println(aa)
|
||||
}
|
||||
|
||||
@@ -3,7 +3,6 @@ package weixinapi
|
||||
import (
|
||||
"bytes"
|
||||
"fmt"
|
||||
"git.rosy.net.cn/jx-callback/globals"
|
||||
"math/rand"
|
||||
"mime/multipart"
|
||||
"net/http"
|
||||
@@ -90,7 +89,6 @@ func (a *API) AccessAPI(action string, params map[string]interface{}, body strin
|
||||
if accessToken == "" {
|
||||
panic("token is empty!")
|
||||
}
|
||||
globals.SugarLogger.Debugf("-------token := %s, action := %s", accessToken, action)
|
||||
params2["access_token"] = accessToken
|
||||
}
|
||||
fullURL := utils.GenerateGetURL(prodURL, action, params2)
|
||||
|
||||
@@ -5,6 +5,7 @@ import (
|
||||
)
|
||||
|
||||
func TestGetUnlimited(t *testing.T) {
|
||||
api.CBSetToken("103_WpV0UHqL-2svlix1nc_3LOkRmlrlvaWy-B5ZBRkAtNZ5TwyYRcwIB3BBWfIVCaccl3bSSNlA7yet9VPfOrIaxQfGugNSZRPmagxyb4H4j2MjYYQt7CakU9H8zT0LHPaAFAYUC")
|
||||
result, err := api.GetUnlimited("storeID=103197", "")
|
||||
if err != nil {
|
||||
t.Fatal(err.Error())
|
||||
|
||||
Reference in New Issue
Block a user