mirror of
https://gitee.com/java110/MicroCommunityWeb.git
synced 2026-06-12 10:00:56 +08:00
perf(notice): 优化公告增改接口返回状态判断
This commit is contained in:
parent
716992e971
commit
986885cfc9
@ -129,13 +129,15 @@
|
|||||||
},
|
},
|
||||||
function (json, res) {
|
function (json, res) {
|
||||||
//vm.menus = vm.refreshMenuActive(JSON.parse(json),0);
|
//vm.menus = vm.refreshMenuActive(JSON.parse(json),0);
|
||||||
if (res.status == 200) {
|
let _json = JSON.parse(json)
|
||||||
|
if (_json.code == 0) {
|
||||||
//关闭model
|
//关闭model
|
||||||
vc.component.clearaddNoticeViewInfo();
|
vc.component.clearaddNoticeViewInfo();
|
||||||
vc.emit('noticeManage', 'listNotice', {});
|
vc.emit('noticeManage', 'listNotice', {});
|
||||||
vc.toast("添加成功")
|
vc.toast("添加成功")
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
vc.toast(_json.msg);
|
||||||
},
|
},
|
||||||
function (errInfo, error) {
|
function (errInfo, error) {
|
||||||
console.log('请求失败处理');
|
console.log('请求失败处理');
|
||||||
|
|||||||
@ -114,12 +114,14 @@
|
|||||||
},
|
},
|
||||||
function (json, res) {
|
function (json, res) {
|
||||||
//vm.menus = vm.refreshMenuActive(JSON.parse(json),0);
|
//vm.menus = vm.refreshMenuActive(JSON.parse(json),0);
|
||||||
if (res.status == 200) {
|
let _json = JSON.parse(json)
|
||||||
|
if (_json.code == 0) {
|
||||||
//关闭model
|
//关闭model
|
||||||
vc.emit('noticeManage', 'listNotice', {});
|
vc.emit('noticeManage', 'listNotice', {});
|
||||||
vc.toast("修改成功");
|
vc.toast("修改成功");
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
vc.toast(_json.msg);
|
||||||
},
|
},
|
||||||
function (errInfo, error) {
|
function (errInfo, error) {
|
||||||
console.log('请求失败处理');
|
console.log('请求失败处理');
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user