提交 6bad0403 编写于 作者: tony001's avatar tony001

优化后台界面行为异常处理

上级 de6b7ed8
...@@ -141,11 +141,12 @@ ${backend_block} ...@@ -141,11 +141,12 @@ ${backend_block}
</#if> </#if>
return response; return response;
}).catch((response: any) => { }).catch((response: any) => {
if (!response || !response.status || !response.data) { if (response && response.status && response.data) {
actionContext.$Notice.error({ title: '错误', desc: '系统异常!' }); actionContext.$Notice.error({ title: (actionContext.$t('app.commonWords.wrong') as string), desc: response.data.message });
return; return;
} }
if (response.status === 401) { if (!response || !response.status || !response.data) {
actionContext.$Notice.error({ title: (actionContext.$t('app.commonWords.wrong') as string), desc: (actionContext.$t('app.commonWords.sysException') as string) });
return; return;
} }
return response; return response;
......
Markdown 格式
0% or
您添加了 0 到此讨论。请谨慎行事。
先完成此消息的编辑!
想要评论请 注册