优化删除

This commit is contained in:
java110 2022-04-12 16:09:07 +08:00
parent 06c2b057ea
commit c5d1585bb8

View File

@ -20,19 +20,19 @@
vc.component.deleteOwnerCarInfo.communityId = vc.getCurrentCommunity().communityId; vc.component.deleteOwnerCarInfo.communityId = vc.getCurrentCommunity().communityId;
vc.http.apiPost( vc.http.apiPost(
'owner.deleteOwnerCars', 'owner.deleteOwnerCars',
JSON.stringify(vc.component.deleteOwnerCarInfo), JSON.stringify(vc.component.deleteOwnerCarInfo), {
{
emulateJSON: true emulateJSON: true
}, },
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
$('#deleteOwnerCarModel').modal('hide'); $('#deleteOwnerCarModel').modal('hide');
vc.emit($props.notifyLoadDataComponentName, 'listOwnerCarData', {}); vc.emit($props.notifyLoadDataComponentName, 'listOwnerCarData', {});
return; return;
} }
vc.component.deleteOwnerCarnfo.errorInfo = json; vc.toast(_json.msg);
}, },
function(errInfo, error) { function(errInfo, error) {
vc.toast(errInfo); vc.toast(errInfo);