Commit 6470e034 authored by nikogu's avatar nikogu
parent 558da10f
@import "~antd/lib/style/themes/default.less";
.globalFooter {
margin: 32px 28px 16px;
padding: 16px;
margin: 32px 0 16px 0;
text-align: center;
.links {
......
import fetch from 'dva/fetch';
import { notification } from 'antd';
function checkStatus(response) {
if (response.status >= 200 && response.status < 300) {
return response;
}
const error = new Error(response.statusText);
return response.json().then((result) => {
if (result.code) {
notification.error({
message: result.name,
description: result.message,
});
}
if (result.stack) {
notification.error({
message: '请求错误',
description: result.message,
});
}
const error = new Error(result.message);
error.response = response;
throw error;
});
}
/**
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment