reject错误
This commit is contained in:
@@ -120,6 +120,7 @@ function createAxios<Data = any, T = ApiPromise<Data>>(
|
|||||||
message: response.data.msg
|
message: response.data.msg
|
||||||
})
|
})
|
||||||
router.push({ name: 'login' })
|
router.push({ name: 'login' })
|
||||||
|
return Promise.reject(response.data)
|
||||||
} else {
|
} else {
|
||||||
if (options.showCodeMessage) {
|
if (options.showCodeMessage) {
|
||||||
ElNotification({
|
ElNotification({
|
||||||
@@ -127,6 +128,7 @@ function createAxios<Data = any, T = ApiPromise<Data>>(
|
|||||||
message: response.data.message || '未知错误'
|
message: response.data.message || '未知错误'
|
||||||
})
|
})
|
||||||
}
|
}
|
||||||
|
return Promise.reject(response.data)
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
error => {
|
error => {
|
||||||
|
|||||||
Reference in New Issue
Block a user