- 美团配送正式API与网页API的错误消息字段不同
This commit is contained in:
@@ -240,7 +240,11 @@ func (a *API) AccessAPI2(baseURL, action string, params map[string]interface{})
|
|||||||
}
|
}
|
||||||
return platformapi.ErrLevelSuccess, nil
|
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)
|
newErr := utils.NewErrorIntCode(retVal.Message, code)
|
||||||
return platformapi.ErrLevelCodeIsNotOK, newErr
|
return platformapi.ErrLevelCodeIsNotOK, newErr
|
||||||
})
|
})
|
||||||
|
|||||||
Reference in New Issue
Block a user