fix(projects): 修复网络请求错误空信息的提示
This commit is contained in:
parent
225c4fe022
commit
ff9216b621
@ -22,7 +22,9 @@ export function showErrorMsg(error: RequestServiceError) {
|
|||||||
if (!NO_ERROR_MSG_CODE.includes(error.code)) {
|
if (!NO_ERROR_MSG_CODE.includes(error.code)) {
|
||||||
if (!hasErrorMsg(error)) {
|
if (!hasErrorMsg(error)) {
|
||||||
addErrorMsg(error);
|
addErrorMsg(error);
|
||||||
window.$message?.error(error.msg, { duration: ERROR_MSG_DURATION });
|
if (error.msg) {
|
||||||
|
window.$message?.error(error.msg, { duration: ERROR_MSG_DURATION });
|
||||||
|
}
|
||||||
setTimeout(() => {
|
setTimeout(() => {
|
||||||
removeErrorMsg(error);
|
removeErrorMsg(error);
|
||||||
}, ERROR_MSG_DURATION);
|
}, ERROR_MSG_DURATION);
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user