webpackJsonp([26],{oBmn:function(t,e,i){"use strict";Object.defineProperty(e,"__esModule",{value:!0});var s={name:"main-keep-alive",data:function(){return{title:"",index:this.$route.query.index,res:[],loading:!1,finished:!1,refreshing:!1,isShow:!1,page:1}},methods:{snippet:function(t){return t.replace(/<[^>]*>/g,"")},goTo:function(t){this.$router.push(t)},type:function(){switch(this.index=this.$route.query.index,this.index){case"0":this.title="家庭教育指导";break;case"1":this.title="家校区介绍";break;case"2":this.title="家长讲师团简介";break;case"3":this.title="社会义工合作单位";break;case"4":this.title="劳动教育教师简介";break;default:this.title="家校区"}},goBack:function(){if(this.$router.isBack=!0,window.history.length<=1)return this.$router.push({path:"/"}),!1;this.$router.go(-1)},getHome:function(){var t=this;this.loading=!0;var e={pid:this.index,page:this.page};this.ajax.get(this.$store.state.api+"getHomeByPid",e).then(function(e){0==e.data[0].length?t.isShow=!0:t.isShow=!1,t.page++,t.loading=!1,t.refreshing=!1,t.finished=!1,t.res=e.data[0],console.log(e.data)}).catch(function(e){t.loading=!1,t.refreshing=!1,console.error(e)})},onRefresh:function(){this.page=1,this.getHome()},onLoad:function(){var t=this,e={pid:this.index,page:this.page};this.ajax.get(this.$store.state.api+"getHomeByPid",e).then(function(e){t.loading=!1,t.refreshing=!1,t.res=t.res.concat(e.data[0]);var i=t.res.length?t.res[0].num:0;t.res.length<i?(t.page++,t.loading=!1):(t.finished=!0,t.loading=!0),console.log(e.data)}).catch(function(e){t.loading=!1,t.refreshing=!1,console.error(e)})}},activated:function(){this.page=1,this.type(),this.getHome()}},n={render:function(){var t=this,e=t.$createElement,s=t._self._c||e;return s("div",{staticClass:"pb_content2",staticStyle:{background:"#fff"}},[s("div",{staticClass:"pb_head"},[s("van-icon",{staticClass:"pb_back",attrs:{name:"arrow-left",color:"#fff",size:"1.2rem"},on:{click:t.goBack}}),t._v(" "),s("span",[t._v(t._s(t.title))])],1),t._v(" "),s("div",{staticClass:"pb_content_body"},[s("van-pull-refresh",{staticStyle:{"padding-top":"0.5rem"},attrs:{"looing-text":"释放刷新","pulling-text":"下拉刷新"},on:{refresh:t.onRefresh},model:{value:t.refreshing,callback:function(e){t.refreshing=e},expression:"refreshing"}},[s("van-list",{attrs:{finished:t.finished,"finished-text":"没有更多啦",offset:"10","immediate-check":!1},on:{load:t.onLoad},model:{value:t.loading,callback:function(e){t.loading=e},expression:"loading"}},[t.isShow?s("van-empty",{staticClass:"custom-image",attrs:{image:i("0vHl"),description:"暂无数据"}}):t._e(),t._v(" "),s("div",{staticClass:"hs_content"},t._l(t.res,function(e,n){return s("div",{key:n,staticClass:"hs_content_body van-hairline--top",on:{click:function(i){return t.goTo("/my/homeSchool/homeSchoolArticle?id="+e.id)}}},[s("div",{staticClass:"hs_title"},[s("div",{staticClass:"van-ellipsis"},[s("span",[t._v(t._s(e.title))])]),t._v(" "),s("div",{staticClass:"van-multi-ellipsis--l2"},[s("span",{domProps:{innerHTML:t._s(t.snippet(e.content))}})])]),t._v(" "),e.poster?s("div",{staticClass:"img-box"},[s("van-image",{attrs:{width:"100%",height:"5rem",fit:"cover",src:e.poster},scopedSlots:t._u([{key:"loading",fn:function(){return[s("van-loading",{attrs:{type:"spinner",size:"20"}})]},proxy:!0},{key:"error",fn:function(){return[s("img",{staticStyle:{"object-fit":"none",width:"100%",height:"100%"},attrs:{src:i("85Bp")}})]},proxy:!0}],null,!0)})],1):t._e()])}),0)],1)],1)],1)])},staticRenderFns:[]};var a=i("VU/8")(s,n,!1,function(t){i("tNu/")},"data-v-acffa48c",null);e.default=a.exports},"tNu/":function(t,e){}});
//# sourceMappingURL=26.1b21ea45ba4381385677.js.map