mirror of
https://gitee.com/java110/MicroCommunityWeb.git
synced 2026-02-24 21:59:12 +08:00
perf(notice): 优化公告增改接口返回状态判断
This commit is contained in:
parent
716992e971
commit
986885cfc9
@ -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('请求失败处理');
|
||||
|
||||
@ -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);
|
||||
|
||||
Loading…
Reference in New Issue
Block a user