This commit is contained in:
邹宗楠
2021-12-24 15:26:09 +08:00
parent 9d4ec65dc1
commit 15800e97e5
3 changed files with 9 additions and 8 deletions

View File

@@ -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 {

View File

@@ -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)
} }

View File

@@ -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)
} }