mirror of
https://gitee.com/baidu/amis.git
synced 2024-12-02 03:58:07 +08:00
api 接口返回错误提示
This commit is contained in:
parent
81ce4a4881
commit
90b40083af
@ -128,7 +128,10 @@ function responseAdaptor(ret: fetcherResult) {
|
||||
|
||||
if (!data) {
|
||||
throw new Error('Response is empty!');
|
||||
} else if (!data.hasOwnProperty('status')) {
|
||||
throw new Error('接口返回格式不符合,请参考 http://amis.baidu.com/v2/docs/api');
|
||||
}
|
||||
|
||||
const payload: Payload = {
|
||||
ok: data.status == 0,
|
||||
status: data.status,
|
||||
|
Loading…
Reference in New Issue
Block a user