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

调整版本号不一致的问题

上级 542e4d07
...@@ -1007,7 +1007,18 @@ import { debounceTime, distinctUntilChanged } from 'rxjs/operators'; ...@@ -1007,7 +1007,18 @@ import { debounceTime, distinctUntilChanged } from 'rxjs/operators';
}); });
}).catch((response: any) => { }).catch((response: any) => {
if (response && response.status && response.data) { if (response && response.status && response.data) {
this.$Notice.error({ title: '错误', desc: response.data.message }); if(response.data.errorKey && Object.is(response.data.errorKey,"versionCheck")){
this.$Modal.confirm({
title: '保存数据发生错误',
content: '数据不一致,可能后台数据已经被修改,是否要重新加载数据?',
onOk: () => {
this.refresh([]);
},
onCancel: () => { }
});
}else{
this.$Notice.error({ title: '错误', desc: response.data.message });
}
return; return;
} }
if (!response || !response.status || !response.data) { if (!response || !response.status || !response.data) {
...@@ -1085,8 +1096,19 @@ import { debounceTime, distinctUntilChanged } from 'rxjs/operators'; ...@@ -1085,8 +1096,19 @@ import { debounceTime, distinctUntilChanged } from 'rxjs/operators';
resolve(response); resolve(response);
}).catch((response: any) => { }).catch((response: any) => {
if (response && response.status && response.data) { if (response && response.status && response.data) {
this.$Notice.error({ title: '错误', desc: response.data.message }); if(response.data.errorKey && Object.is(response.data.errorKey,"versionCheck")){
reject(response); this.$Modal.confirm({
title: '保存数据发生错误',
content: '数据不一致,可能后台数据已经被修改,是否要重新加载数据?',
onOk: () => {
this.refresh([]);
},
onCancel: () => { }
});
}else{
this.$Notice.error({ title: '错误', desc: response.data.message });
reject(response);
}
return; return;
} }
if (!response || !response.status || !response.data) { if (!response || !response.status || !response.data) {
......
Markdown 格式
0% or
您添加了 0 到此讨论。请谨慎行事。
先完成此消息的编辑!
想要评论请 注册