fix: dataHandler 支持 promise

This commit is contained in:
winixt 2024-01-18 17:12:19 +08:00
parent f589d133d2
commit 280d5a3431

View File

@ -141,7 +141,7 @@ const _request = (url, data, options, onSuccess) => {
} }
if (!context.error) { if (!context.error) {
if (onSuccess) { if (onSuccess) {
return onSuccess(dataHandler(context.response.data, context.response), context); return onSuccess(await dataHandler(context.response.data, context.response), context);
} }
return dataHandler(context.response.data, context.response); return dataHandler(context.response.data, context.response);
} }