|
|
@ -108,7 +108,7 @@ service.interceptors.response.use(
|
|
|
|
// }
|
|
|
|
// }
|
|
|
|
} else {
|
|
|
|
} else {
|
|
|
|
// 统一成功提示
|
|
|
|
// 统一成功提示
|
|
|
|
const responseUrl = response.config.url
|
|
|
|
const responseUrls = response.config.url.split('/')
|
|
|
|
const apiNameArray = [
|
|
|
|
const apiNameArray = [
|
|
|
|
'add',
|
|
|
|
'add',
|
|
|
|
'edit',
|
|
|
|
'edit',
|
|
|
@ -129,7 +129,7 @@ service.interceptors.response.use(
|
|
|
|
'saveDraft'
|
|
|
|
'saveDraft'
|
|
|
|
]
|
|
|
|
]
|
|
|
|
apiNameArray.forEach((apiName) => {
|
|
|
|
apiNameArray.forEach((apiName) => {
|
|
|
|
if (responseUrl.endsWith(apiName)) {
|
|
|
|
if (responseUrls[responseUrls.length - 1].includes(apiName)) {
|
|
|
|
message.success(data.msg)
|
|
|
|
message.success(data.msg)
|
|
|
|
}
|
|
|
|
}
|
|
|
|
})
|
|
|
|
})
|
|
|
|