mirror of
https://github.com/whyour/qinglong.git
synced 2026-07-16 17:09:20 +08:00
增加文件保存限制,增加接口错误提醒
This commit is contained in:
+5
-2
@@ -1,11 +1,14 @@
|
||||
import { extend } from 'umi-request';
|
||||
import { history } from 'umi';
|
||||
import { notification } from 'antd';
|
||||
import config from './config';
|
||||
|
||||
const time = Date.now();
|
||||
const errorHandler = function (error: any) {
|
||||
if (error.response) {
|
||||
console.log(error.response);
|
||||
const message = error.data
|
||||
? error.data.errors && error.data.errors.message
|
||||
: error.response.statusText;
|
||||
notification.error({ message });
|
||||
} else {
|
||||
console.log(error.message);
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user