123
This commit is contained in:
@@ -129,10 +129,10 @@ func (a *API) AccessAPI2(cmd string, isGet bool, bizParams map[string]interface{
|
|||||||
params := make(map[string]interface{})
|
params := make(map[string]interface{})
|
||||||
params["timestamp"] = time.Now().Unix()
|
params["timestamp"] = time.Now().Unix()
|
||||||
params["app_id"] = a.appID
|
params["app_id"] = a.appID
|
||||||
if a.appID == appIDsc {
|
//if a.appID == appIDsc {
|
||||||
params["access_token"] = a.token
|
// params["access_token"] = a.token
|
||||||
}
|
//}
|
||||||
// params["access_token"] = "token_nH_IlcWQKAkZBqklwItNRw"
|
params["access_token"] = "token_s14CNZErtLaXijy0JtBAXg"
|
||||||
params = utils.MergeMaps(params, bizParams)
|
params = utils.MergeMaps(params, bizParams)
|
||||||
imgData := params[KeyImgData]
|
imgData := params[KeyImgData]
|
||||||
if imgData != nil {
|
if imgData != nil {
|
||||||
|
|||||||
@@ -41,7 +41,7 @@ func TestAccessAPI(t *testing.T) {
|
|||||||
}
|
}
|
||||||
|
|
||||||
func TestGetOAuthCode(t *testing.T) {
|
func TestGetOAuthCode(t *testing.T) {
|
||||||
result, err := api.GetOAuthCode("10874383")
|
result, err := api.GetOAuthCode("8967897")
|
||||||
if err != nil {
|
if err != nil {
|
||||||
t.Fatal(err)
|
t.Fatal(err)
|
||||||
}
|
}
|
||||||
@@ -49,7 +49,7 @@ func TestGetOAuthCode(t *testing.T) {
|
|||||||
}
|
}
|
||||||
|
|
||||||
func TestGetAccessToken(t *testing.T) {
|
func TestGetAccessToken(t *testing.T) {
|
||||||
result, err := api.GetAccessToken("code_nsX2gj8sQFcB0bYr0iVJtg")
|
result, err := api.GetAccessToken("code_ra0oUBjsRwRf0f5m0wJB9g")
|
||||||
if err != nil {
|
if err != nil {
|
||||||
t.Fatal(err)
|
t.Fatal(err)
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -44,7 +44,8 @@ func TestRetailCatDelete(t *testing.T) {
|
|||||||
}
|
}
|
||||||
|
|
||||||
func TestRetailList(t *testing.T) {
|
func TestRetailList(t *testing.T) {
|
||||||
result, err := api.RetailList("11655829", 0, 20)
|
result, err := api.RetailList("8967897"+
|
||||||
|
"", 0, 20)
|
||||||
if err != nil {
|
if err != nil {
|
||||||
t.Fatal(err)
|
t.Fatal(err)
|
||||||
}
|
}
|
||||||
@@ -56,7 +57,7 @@ func TestRetailList(t *testing.T) {
|
|||||||
}
|
}
|
||||||
|
|
||||||
func TestRetailListAll(t *testing.T) {
|
func TestRetailListAll(t *testing.T) {
|
||||||
result, err := api.RetailListAll("11655829")
|
result, err := api.RetailListAll("8967897")
|
||||||
if err != nil {
|
if err != nil {
|
||||||
t.Fatal(err)
|
t.Fatal(err)
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user