- 美团配送正式API与网页API的错误消息字段不同

This commit is contained in:
gazebo
2019-07-24 18:47:22 +08:00
parent 3af1d77500
commit 7f102905b5

View File

@@ -240,7 +240,11 @@ func (a *API) AccessAPI2(baseURL, action string, params map[string]interface{})
}
return platformapi.ErrLevelSuccess, nil
}
retVal.Message = jsonResult1["message"].(string)
msgKey := "message"
if baseURL != mtpsAPIURL {
msgKey = "msg"
}
retVal.Message, _ = jsonResult1[msgKey].(string)
newErr := utils.NewErrorIntCode(retVal.Message, code)
return platformapi.ErrLevelCodeIsNotOK, newErr
})