Commit c69c80d4 by zhengjie

1.7 优化

parent ea183f38
......@@ -132,6 +132,6 @@ a:hover {
height: 32px;
width: 135px;
display: block;
margin: 0 auto;
//margin: 0 auto;
}
}
......@@ -45,9 +45,16 @@ service.interceptors.response.use(
try {
code = error.response.data.status
} catch (e) {
if (error.toString().indexOf('timeout')) {
if (error.toString().indexOf('Error: timeout') !== -1) {
Notification.error({
title: '请求超时',
title: '请求超时,请重试',
duration: 2500
})
return Promise.reject(error)
}
if (error.toString().indexOf('Error: Network Error') !== -1) {
Notification.error({
title: '网络错误,请联系网站管理员恢复',
duration: 2500
})
return Promise.reject(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