perf(notice): 优化公告增改接口返回状态判断

This commit is contained in:
KingMo 2022-08-16 13:45:43 +08:00
parent 716992e971
commit 986885cfc9
2 changed files with 7 additions and 3 deletions

View File

@ -129,13 +129,15 @@
},
function (json, res) {
//vm.menus = vm.refreshMenuActive(JSON.parse(json),0);
if (res.status == 200) {
let _json = JSON.parse(json)
if (_json.code == 0) {
//关闭model
vc.component.clearaddNoticeViewInfo();
vc.emit('noticeManage', 'listNotice', {});
vc.toast("添加成功")
return;
}
vc.toast(_json.msg);
},
function (errInfo, error) {
console.log('请求失败处理');

View File

@ -114,12 +114,14 @@
},
function (json, res) {
//vm.menus = vm.refreshMenuActive(JSON.parse(json),0);
if (res.status == 200) {
let _json = JSON.parse(json)
if (_json.code == 0) {
//关闭model
vc.emit('noticeManage', 'listNotice', {});
vc.toast("修改成功");
return;
}
vc.toast(_json.msg);
},
function (errInfo, error) {
console.log('请求失败处理');
@ -214,7 +216,7 @@
//关闭model
// $summernote.summernote('insertImage', "/callComponent/download/getFile/file?fileId=" + data.fileId + "&communityId=" + vc.getCurrentCommunity().communityId);
$summernote.summernote('insertImage', data.url);
return;
}
vc.toast(json);