mirror of
https://github.com/zclzone/vue-naive-admin.git
synced 2025-05-01 06:39:01 +08:00
fix: message判空
This commit is contained in:
parent
fe4bbded53
commit
b780113f18
@ -43,7 +43,7 @@ export function setupInterceptors(axiosInstance) {
|
|||||||
const message = resolveResError(code, data?.message ?? statusText)
|
const message = resolveResError(code, data?.message ?? statusText)
|
||||||
|
|
||||||
//需要错误提醒
|
//需要错误提醒
|
||||||
!config.noNeedTip && window.$message?.error(message)
|
!config?.noNeedTip && message && window.$message?.error(message)
|
||||||
return Promise.reject({ code, message, error: data ?? response })
|
return Promise.reject({ code, message, error: data ?? response })
|
||||||
}
|
}
|
||||||
return Promise.resolve(data ?? response)
|
return Promise.resolve(data ?? response)
|
||||||
|
Loading…
x
Reference in New Issue
Block a user