- return result even error in dada api

This commit is contained in:
gazebo
2019-01-23 10:43:40 +08:00
parent ef0c0de7a7
commit 227d37bf3a
3 changed files with 15 additions and 12 deletions

View File

@@ -18,11 +18,13 @@ const (
)
const (
ResponseCodeException = -1
ResponseCodeSuccess = 0
ResponseCodeSignErr = 2003
ResponseCodeRetryLater = 2012
ResponseCodeNetworkErr = 2455
ResponseCodeException = -1
ResponseCodeSuccess = 0
ResponseCodeSignErr = 2003
ResponseCodeRetryLater = 2012
ResponseCodeShopNotExist = 2402
ResponseCodeShopAlreadyExist = 2403
ResponseCodeNetworkErr = 2455
)
type API struct {
@@ -124,8 +126,8 @@ func (a *API) AccessAPI(action string, params interface{}) (retVal *ResponseResu
Msg: jsonResult1["msg"].(string),
Status: jsonResult1["status"].(string),
}
retVal.Result = jsonResult1["result"]
if code == ResponseCodeSuccess {
retVal.Result = jsonResult1["result"]
return platformapi.ErrLevelSuccess, nil
}
newErr := utils.NewErrorIntCode(retVal.Msg, code)