mirror of
https://gitee.com/java110/MicroCommunityWeb.git
synced 2026-02-25 06:09:11 +08:00
52 lines
1.5 KiB
JavaScript
Executable File
52 lines
1.5 KiB
JavaScript
Executable File
(function(vc,vm){
|
|
|
|
vc.extends({
|
|
data:{
|
|
deleteMenuInfo:{
|
|
|
|
}
|
|
},
|
|
_initMethod:function(){
|
|
|
|
},
|
|
_initEvent:function(){
|
|
vc.on('deleteMenu','openDeleteMenuModal',function(_params){
|
|
|
|
vc.component.deleteMenuInfo = _params;
|
|
$('#deleteMenuModel').modal('show');
|
|
|
|
});
|
|
},
|
|
methods:{
|
|
deleteMenu:function(){
|
|
//vc.component.deleteMenuInfo.communityId=vc.getCurrentCommunity().communityId;
|
|
vc.http.apiPost(
|
|
'/menu.deleteMenu',
|
|
JSON.stringify(vc.component.deleteMenuInfo),
|
|
{
|
|
emulateJSON:true
|
|
},
|
|
function(json,res){
|
|
//vm.menus = vm.refreshMenuActive(JSON.parse(json),0);
|
|
if(res.status == 200){
|
|
//关闭model
|
|
$('#deleteMenuModel').modal('hide');
|
|
vc.emit('menuManage','listMenu',{});
|
|
return ;
|
|
}
|
|
vc.toast(json);
|
|
},
|
|
function(errInfo,error){
|
|
console.log('请求失败处理');
|
|
vc.toast(json);
|
|
|
|
});
|
|
},
|
|
closeDeleteMenuModel:function(){
|
|
$('#deleteMenuModel').modal('hide');
|
|
}
|
|
}
|
|
});
|
|
|
|
})(window.vc,window.vc.component);
|