fix: 返回内容code类型处理

This commit is contained in:
binaryify
2023-09-09 21:46:03 +08:00
parent b6f6a87a86
commit 10d8ef5f43
2 changed files with 9 additions and 3 deletions

View File

@ -198,6 +198,9 @@ const createRequest = (method, url, data = {}, options) => {
} else {
answer.body = body
}
if (answer.body.code) {
answer.body.code = Number(answer.body.code)
}
answer.status = Number(answer.body.code || res.status)
if (