var $url="/wx/layerImage",data=utils.init({siteId:utils.getQueryInt("siteId"),showType:"card",groups:null,count:null,images:null,urlList:null,form:{siteId:utils.getQueryInt("siteId"),keyword:"",groupId:-utils.getQueryInt("siteId"),page:1,perPage:24}}),methods={apiList:function(t){var i=this;this.form.page=t,utils.loading(this,!0),$api.get($url,{params:this.form}).then(function(t){var n=t.data;i.groups=n.groups,i.count=n.count,i.images=n.images,i.urlList=_.map(i.images,function(t){return t.thumbUrl})}).catch(function(t){utils.error(t)}).then(function(){utils.loading(i,!1)})},getGroupName:function(){var t=this;return this.form.groupId>0?_.find(this.groups,function(i){return i.id===t.form.groupId}).groupName:""},btnImageClick:function(t){parent.$vue.runLayerImage(t),utils.closeLayer()},btnGroupClick:function(t){var i=this;this.form.groupId=t,this.form.page=1,utils.loading(this,!0),$api.get($url,{params:this.form}).then(function(t){var n=t.data;i.groups=n.groups,i.count=n.count,i.images=n.images,i.urlList=_.map(i.images,function(t){return t.url})}).catch(function(t){utils.error(t)}).then(function(){utils.loading(i,!1)})},btnSearchClick(){utils.loading(this,!0),this.apiList(1)},btnPageClick:function(t){utils.loading(this,!0),this.apiList(t)},getFriendlyContent:function(t){if(1===t.items.length)return t.items[0].title;var i=1;return t.items.map(function(t){return i+++". "+t.title}).join("<br />")},btnCancelClick:function(){utils.closeLayer()}},$vue=new Vue({el:"#main",data:data,methods:methods,created:function(){this.apiList(1)}});