- weimob order and callback
This commit is contained in:
@@ -105,7 +105,7 @@ func (a *API) MustGetToken() *TokenInfo {
|
||||
return token
|
||||
}
|
||||
|
||||
func (a *API) AccessAPI(apiStr string, apiParams map[string]interface{}) (retVal map[string]interface{}, err error) {
|
||||
func (a *API) AccessAPI(apiStr string, apiParams map[string]interface{}) (retVal interface{}, err error) {
|
||||
err = platformapi.AccessPlatformAPIWithRetry(a.client,
|
||||
func() *http.Request {
|
||||
var request *http.Request
|
||||
@@ -171,7 +171,7 @@ func (a *API) AccessAPI(apiStr string, apiParams map[string]interface{}) (retVal
|
||||
errMsg = errMap["errmsg"].(string)
|
||||
}
|
||||
if code == ResponseCodeSuccess {
|
||||
retVal = jsonResult1["data"].(map[string]interface{})
|
||||
retVal = jsonResult1["data"]
|
||||
return platformapi.ErrLevelSuccess, nil
|
||||
}
|
||||
}
|
||||
@@ -203,7 +203,7 @@ func (a *API) RefreshTokenByCode(code, redirectURL string) (retVal *TokenInfo, e
|
||||
"redirect_uri": redirectURL,
|
||||
})
|
||||
if err == nil {
|
||||
retVal = map2TokenInfo(result)
|
||||
retVal = map2TokenInfo(result.(map[string]interface{}))
|
||||
a.SetToken(retVal)
|
||||
return retVal, nil
|
||||
}
|
||||
@@ -218,7 +218,7 @@ func (a *API) RefreshTokenByRefreshToken() (retVal *TokenInfo, err error) {
|
||||
"refresh_token": curToken.RefreshToken,
|
||||
})
|
||||
if err == nil {
|
||||
retVal = map2TokenInfo(result)
|
||||
retVal = map2TokenInfo(result.(map[string]interface{}))
|
||||
a.SetToken(retVal)
|
||||
return retVal, nil
|
||||
|
||||
|
||||
Reference in New Issue
Block a user