var $url="/cms/contents/contentsLayerDelete",data=utils.init({page:utils.getQueryInt("page"),siteId:utils.getQueryInt("siteId"),channelId:utils.getQueryInt("channelId"),channelContentIds:utils.getQueryString("channelContentIds"),contents:null,form:{isRetainFiles:!1}}),methods={apiGet:function(){var t=this;utils.loading(this,!0),$api.get($url,{params:{siteId:this.siteId,channelId:this.channelId,channelContentIds:this.channelContentIds}}).then(function(n){var e=n.data;t.contents=e.contents}).catch(function(t){utils.error(t)}).then(function(){utils.loading(t,!1)})},apiSubmit:function(){var t=this;utils.loading(this,!0),$api.post($url,{siteId:this.siteId,channelId:this.channelId,channelContentIds:this.channelContentIds,isRetainFiles:this.form.isRetainFiles}).then(function(n){n.data;parent.$vue.apiList(t.channelId,t.page,"内容删除成功!",!0),utils.closeLayer()}).catch(function(t){utils.error(t)}).then(function(){utils.loading(t,!1)})},getContentUrl:function(t){return t.checked?utils.getRootUrl("redirect",{siteId:t.siteId,channelId:t.channelId,contentId:t.id}):$apiUrl+"/preview/"+t.siteId+"/"+t.channelId+"/"+t.id},btnSubmitClick:function(){var t=this;this.$refs.form.validate(function(n){n&&t.apiSubmit()})},btnCancelClick:function(){utils.closeLayer()}},$vue=new Vue({el:"#main",data:data,methods:methods,created:function(){this.apiGet()}});