1
This commit is contained in:
@@ -93,7 +93,9 @@ func (a *API) AccessAPI(action string, params map[string]interface{}, body strin
|
|||||||
params2["access_token"] = accessToken
|
params2["access_token"] = accessToken
|
||||||
}
|
}
|
||||||
globals.SugarLogger.Debugf("===========param 2 := %s", utils.Format4Output(params2, false))
|
globals.SugarLogger.Debugf("===========param 2 := %s", utils.Format4Output(params2, false))
|
||||||
globals.SugarLogger.Debugf("===========api 2 := %s", utils.Format4Output(a, false))
|
globals.SugarLogger.Debugf("===========api 2 := %s", utils.Format4Output(a.appID, false))
|
||||||
|
globals.SugarLogger.Debugf("===========api 2 := %s", utils.Format4Output(a.secret, false))
|
||||||
|
globals.SugarLogger.Debugf("===========api 2 := %s", utils.Format4Output(a.token, false))
|
||||||
fullURL := utils.GenerateGetURL(prodURL, action, params2)
|
fullURL := utils.GenerateGetURL(prodURL, action, params2)
|
||||||
// baseapi.SugarLogger.Debug(fullURL)
|
// baseapi.SugarLogger.Debug(fullURL)
|
||||||
|
|
||||||
|
|||||||
@@ -1,9 +1,6 @@
|
|||||||
package weixinapi
|
package weixinapi
|
||||||
|
|
||||||
import (
|
import (
|
||||||
"fmt"
|
|
||||||
"testing"
|
|
||||||
|
|
||||||
"git.rosy.net.cn/baseapi"
|
"git.rosy.net.cn/baseapi"
|
||||||
|
|
||||||
"go.uber.org/zap"
|
"go.uber.org/zap"
|
||||||
@@ -26,22 +23,10 @@ func init() {
|
|||||||
//api = New("wx2bb99eb5d2c9b82c", "6bbbed1443cc062c20a015a64c07a531")
|
//api = New("wx2bb99eb5d2c9b82c", "6bbbed1443cc062c20a015a64c07a531")
|
||||||
|
|
||||||
//weixinapp
|
//weixinapp
|
||||||
api = New("wx18111a41fd17f24f", "c79ac6e1b2d6d7968e72a9658a8b6715")
|
//api = New("wx2d6949f724b2541d", "11f3c380551c4683c149990b004d6df9") // 果园
|
||||||
api.CBSetToken("68_McFYD4DjMiawiqWvGstXuxBq5IKTt9xMHRnwqE4nW8c6YVYhPV7cYEpyf0y0nh0m8qiHKCYbzS6Oc3DN-Wu74_WoNXi7PDzjkZWG2dziBqzsGYE8UVZlpi2ezO0NBKeAEAQEN")
|
// 菜市
|
||||||
}
|
//weixinMiniAppID2 = "wx4b5930c13f8b1170"
|
||||||
|
//weixinMiniSecret2 = "2a57228a716ce991a52739f0ff41111d"
|
||||||
func handleError(t *testing.T, err error) {
|
api = New("wx4b5930c13f8b1170", "2a57228a716ce991a52739f0ff41111d")
|
||||||
if err != nil {
|
api.CBSetToken("79_33m4C2SSnyidIt68MyCaf353asbwwg7-yC6nb3wi9vzSSicozaOoc5abbRAhGhTm85UUi4xb3ZG7yFooKwdsg0E7ZaO8ZcyzKWDMvtVjqMi9I1rTEDnxJAySgsYRXXhABAVBB")
|
||||||
sugarLogger.Debug(err)
|
|
||||||
t.Fatal(err.Error())
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
func aa() {
|
|
||||||
fmt.Println("hello")
|
|
||||||
}
|
|
||||||
|
|
||||||
func TestTest(t *testing.T) {
|
|
||||||
go aa()
|
|
||||||
fmt.Println("world")
|
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -5,7 +5,7 @@ import (
|
|||||||
)
|
)
|
||||||
|
|
||||||
func TestGetUnlimited(t *testing.T) {
|
func TestGetUnlimited(t *testing.T) {
|
||||||
result, err := api.GetUnlimited("a=1", "")
|
result, err := api.GetUnlimited("storeID=103197", "")
|
||||||
if err != nil {
|
if err != nil {
|
||||||
t.Fatal(err.Error())
|
t.Fatal(err.Error())
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user