modified the 400 error
This commit is contained in:
parent
14d0055ba8
commit
6fbbc828d2
|
@ -49,6 +49,12 @@ export default function fetchAPI (url, method, data = null, params = null) {
|
|||
if (!data.detail) {
|
||||
resolve(data)
|
||||
} else {
|
||||
if (data.detail.length === 0) {
|
||||
data.detail = ''
|
||||
}
|
||||
if (data.detail.length === 1) {
|
||||
data.detail = data.detail[0]
|
||||
}
|
||||
notification.error({ message: '错误', description: JSON.stringify(data.detail), key: 'ERROR' })
|
||||
}
|
||||
})
|
||||
|
|
Loading…
Reference in New Issue