1.7 优化

This commit is contained in:
zhengjie
2019-04-18 11:13:56 +08:00
parent ea183f380a
commit c69c80d435
2 changed files with 10 additions and 3 deletions

View File

@@ -132,6 +132,6 @@ a:hover {
height: 32px;
width: 135px;
display: block;
margin: 0 auto;
//margin: 0 auto;
}
}

View File

@@ -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)