var $url="/cms/settings/settingsContentGroup",data=utils.init({siteId:utils.getQueryInt("siteId"),groups:null}),methods={updateGroups:function(t,i){this.groups=t.groups,utils.success(i)},apiList:function(t){var i=this;utils.loading(this,!0),$api.get($url,{params:{siteId:this.siteId}}).then(function(t){var s=t.data;i.groups=s.groups}).catch(function(t){utils.error(t)}).then(function(){utils.loading(i,!1),t&&utils.success(t)})},apiDelete:function(t){var i=this;utils.loading(this,!0),$api.delete($url,{data:{siteId:this.siteId,groupName:t}}).then(function(t){var s=t.data;i.groups=s.groups,utils.success("内容组删除成功！")}).catch(function(t){utils.error(t)}).then(function(){utils.loading(i,!1)})},btnEditClick:function(t){utils.openLayer({title:"编辑内容组",url:utils.getCommonUrl("groupContentLayerAdd",{siteId:this.siteId,groupId:t.id}),width:500,height:300})},btnAddClick:function(){utils.openLayer({title:"新增内容组",url:utils.getCommonUrl("groupContentLayerAdd",{siteId:this.siteId}),width:500,height:300})},btnDeleteClick:function(t){var i=this;utils.alertDelete({title:"删除内容组",text:"此操作将删除内容组 "+t.groupName+"，确定吗？",callback:function(){i.apiDelete(t.groupName)}})},btnOrderClick:function(t,i){var s=this;utils.loading(this,!0),$api.post($url+"/actions/order",{siteId:this.siteId,groupId:t.id,taxis:t.taxis,isUp:i}).then(function(t){var i=t.data;s.groups=i.groups,utils.success("内容组排序成功！")}).catch(function(t){utils.error(t)}).then(function(){utils.loading(s,!1)})}},$vue=new Vue({el:"#main",data:data,methods:methods,created:function(){this.apiList()}});