|
@@ -15,6 +15,7 @@ const err = (error) => {
|
|
|
if (error.response) {
|
|
|
const data = error.response.data
|
|
|
if ((error.response.status == 403 || error.response.status == 401) && window.location.pathname != '/user/login') {
|
|
|
+ notification.destroy()
|
|
|
notification.error({
|
|
|
message: '提示',
|
|
|
description: data.message
|
|
@@ -28,6 +29,7 @@ const err = (error) => {
|
|
|
}
|
|
|
// 超时无法访问服务
|
|
|
if (error.message.indexOf('timeout') >= 0 && window.location.pathname != '/user/login') {
|
|
|
+ notification.destroy()
|
|
|
notification.error({
|
|
|
message: '提示',
|
|
|
description: error.message
|
|
@@ -54,6 +56,7 @@ service.interceptors.request.use(config => {
|
|
|
service.interceptors.response.use((response) => {
|
|
|
console.log(response, 'responseresponseresponse')
|
|
|
if (response.data.status == '-1') {
|
|
|
+ notification.destroy()
|
|
|
notification.error({
|
|
|
message: '提示',
|
|
|
description: response.data.message
|