- 添加菜单权限控制

- url 权限控制
This commit is contained in:
sin
2019-03-01 18:15:12 +08:00
parent 814ca633aa
commit 21bacc19d8
14 changed files with 160 additions and 23 deletions

View File

@@ -22,20 +22,21 @@ const codeMessage = {
504: '网关超时。',
};
const checkStatus = response => {
function checkStatus(response) {
if (response.status >= 200 && response.status < 300) {
return response;
}
const errortext = codeMessage[response.status] || response.statusText;
notification.error({
notification.warning({
message: `请求错误 ${response.status}: ${response.url}`,
description: errortext,
});
const error = new Error(errortext);
error.name = response.status;
error.response = response;
throw error;
};
}
const cachedSave = (response, hashcode) => {
/**