1
This commit is contained in:
@@ -174,7 +174,6 @@ func AccessPlatformAPIWithRetry(client *http.Client, handleRequest func() *http.
|
|||||||
} else {
|
} else {
|
||||||
bodyData, getDataErr = ioutil.ReadAll(response.Body)
|
bodyData, getDataErr = ioutil.ReadAll(response.Body)
|
||||||
}
|
}
|
||||||
globals.SugarLogger.Debugf("-------------%s", string(bodyData))
|
|
||||||
globals.SugarLogger.Debugf("%s", utils.Format4Output(time.Now(), false))
|
globals.SugarLogger.Debugf("%s", utils.Format4Output(time.Now(), false))
|
||||||
if getDataErr != nil {
|
if getDataErr != nil {
|
||||||
baseapi.SugarLogger.Errorf("AccessPlatformAPIWithRetry:%s ioutil.ReadAll failed, url:%v, error:%v", trackInfo, request.URL, err)
|
baseapi.SugarLogger.Errorf("AccessPlatformAPIWithRetry:%s ioutil.ReadAll failed, url:%v, error:%v", trackInfo, request.URL, err)
|
||||||
|
|||||||
@@ -3,6 +3,7 @@ package weixinapi
|
|||||||
import (
|
import (
|
||||||
"bytes"
|
"bytes"
|
||||||
"fmt"
|
"fmt"
|
||||||
|
"git.rosy.net.cn/jx-callback/globals"
|
||||||
"math/rand"
|
"math/rand"
|
||||||
"mime/multipart"
|
"mime/multipart"
|
||||||
"net/http"
|
"net/http"
|
||||||
@@ -89,6 +90,7 @@ func (a *API) AccessAPI(action string, params map[string]interface{}, body strin
|
|||||||
if accessToken == "" {
|
if accessToken == "" {
|
||||||
panic("token is empty!")
|
panic("token is empty!")
|
||||||
}
|
}
|
||||||
|
globals.SugarLogger.Debugf("-------token := %s, action := %s", accessToken, action)
|
||||||
params2["access_token"] = accessToken
|
params2["access_token"] = accessToken
|
||||||
}
|
}
|
||||||
fullURL := utils.GenerateGetURL(prodURL, action, params2)
|
fullURL := utils.GenerateGetURL(prodURL, action, params2)
|
||||||
|
|||||||
@@ -2,8 +2,6 @@ package weixinapi
|
|||||||
|
|
||||||
import (
|
import (
|
||||||
"encoding/json"
|
"encoding/json"
|
||||||
"git.rosy.net.cn/baseapi/utils"
|
|
||||||
"git.rosy.net.cn/jx-callback/globals"
|
|
||||||
)
|
)
|
||||||
|
|
||||||
//获取小程序码
|
//获取小程序码
|
||||||
@@ -17,6 +15,5 @@ func (a *API) GetUnlimited(scene, page string) (results map[string]interface{},
|
|||||||
return results, err
|
return results, err
|
||||||
}
|
}
|
||||||
results, err = a.AccessAPI("wxa/getwxacodeunlimit", nil, string(bytes))
|
results, err = a.AccessAPI("wxa/getwxacodeunlimit", nil, string(bytes))
|
||||||
globals.SugarLogger.Debugf("--------GetUnlimited--:%s", utils.Format4Output(results, false))
|
|
||||||
return results, err
|
return results, err
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user