MicroCommunityWeb/public/components/staff/deleteAStaffCommunity/deleteAStaffCommunity.js
2025-03-20 12:01:58 +08:00

51 lines
1.6 KiB
JavaScript

(function(vc,vm){
vc.extends({
data:{
deleteAStaffCommunityInfo:{
}
},
_initMethod:function(){
},
_initEvent:function(){
vc.on('deleteAStaffCommunity','openDeleteAStaffCommunityModal',function(_params){
$that.deleteAStaffCommunityInfo = _params;
$('#deleteAStaffCommunityModel').modal('show');
});
},
methods:{
deleteAStaffCommunity:function(){
vc.http.apiPost(
'/role.deleteStaffCommunity',
JSON.stringify($that.deleteAStaffCommunityInfo),
{
emulateJSON:true
},
function(json,res){
//vm.menus = vm.refreshMenuActive(JSON.parse(json),0);
if(res.status == 200){
//关闭model
$('#deleteAStaffCommunityModel').modal('hide');
vc.emit('aStaffCommunity', 'listAStaffCommunity', {});
vc.emit('aStaffDetailCommunitys', 'notify', {});
return ;
}
vc.toast(json);
},
function(errInfo,error){
console.log('请求失败处理');
vc.toast(json);
});
},
closeDeleteAStaffCommunityModel:function(){
$('#deleteAStaffCommunityModel').modal('hide');
}
}
});
})(window.vc,window.$that);