(window["webpackJsonp"]=window["webpackJsonp"]||[]).push([["pages-contents-recommend"],{"74db":function(t,e,n){"use strict";n.d(e,"b",(function(){return i})),n.d(e,"c",(function(){return a})),n.d(e,"a",(function(){}));var i=function(){var t=this,e=t.$createElement,i=t._self._c||e;return i("v-uni-view",{staticClass:"userpost",class:t.AppStyle},[i("v-uni-view",{staticClass:"header",style:[{height:t.CustomBar+"px"}]},[i("v-uni-view",{staticClass:"cu-bar bg-white",style:{height:t.CustomBar+"px","padding-top":t.StatusBar+"px"}},[i("v-uni-view",{staticClass:"action",on:{click:function(e){arguments[0]=e=t.$handleEvent(e),t.back.apply(void 0,arguments)}}},[i("v-uni-text",{staticClass:"cuIcon-back"})],1),i("v-uni-view",{staticClass:"content text-bold",style:[{top:t.StatusBar+"px"}]},[t._v("全部推荐文章")]),i("v-uni-view",{staticClass:"action"})],1)],1),i("v-uni-view",{style:[{padding:t.NavBar+"px 10px 0px 10px"}]}),i("v-uni-view",{staticClass:"all-box tn-margin-right-sm tn-margin-left-sm"},[i("v-uni-view",{staticClass:"cu-card article no-card"},[t._l(t.contentsList,(function(e,n){return 1==t.actStyle?[i("articleItemA",{key:n+"_0",attrs:{item:e}})]:t._e()})),t._l(t.contentsList,(function(e,n){return 2==t.actStyle?[i("articleItemB",{key:n+"_0",attrs:{item:e}})]:t._e()})),t.contentsList.length>0?i("v-uni-view",{staticClass:"load-more",on:{click:function(e){arguments[0]=e=t.$handleEvent(e),t.loadMore.apply(void 0,arguments)}}},[i("v-uni-text",[t._v(t._s(t.moreText))])],1):t._e(),0==t.contentsList.length?i("v-uni-view",{staticClass:"no-data"},[i("v-uni-text",{staticClass:"cuIcon-text"}),t._v("暂时没有数据")],1):t._e()],2)],1),0==t.isLoading?i("v-uni-view",{staticClass:"loading"},[i("v-uni-view",{staticClass:"loading-main"},[i("v-uni-image",{attrs:{src:n("9057")}})],1)],1):t._e()],1)},a=[]},"964b":function(t,e,n){"use strict";n("6a54"),Object.defineProperty(e,"__esModule",{value:!0}),e.default=void 0,n("d4b5"),n("c223"),n("e966"),n("f7a5"),n("5c47"),n("a1c1");var i=n("95d0"),a={data:function(){return{StatusBar:this.StatusBar,CustomBar:this.CustomBar,NavBar:this.StatusBar+this.CustomBar,AppStyle:this.$store.state.AppStyle,contentsList:[],actStyle:0,type:0,page:1,moreText:"加载更多",isLoad:0,isLoading:0}},onShow:function(){this.getSet(),this.getContentsList(!1)},onReachBottom:function(){0==this.isLoad&&this.loadMore()},onLoad:function(){},methods:{getSet:function(){var t=this;uni.request({url:t.$API.SPset(),method:"GET",dataType:"json",success:function(e){t.actStyle=e.data.topStyle},fail:function(t){}})},back:function(){uni.navigateBack({delta:1})},loadMore:function(){this.moreText="正在加载中...",this.isLoad=1,this.getContentsList(!0)},reload:function(){this.getContentsList()},getContentsList:function(t){var e=this,n="";if(i.localStorage.getItem("userinfo")){var a=JSON.parse(i.localStorage.getItem("userinfo"));n=a.token}var s=e.page;t&&s++,e.$Net.request({url:e.$API.getContentsList(),data:{searchParams:JSON.stringify(e.$API.removeObjectEmptyKey({type:"post",isrecommend:1})),limit:8,page:s,order:"created",token:n},header:{"Content-Type":"application/x-www-form-urlencoded"},method:"get",dataType:"json",success:function(n){if(e.isLoad=0,e.moreText="加载更多",1==n.data.code){var i=n.data.data;i.length>0?t?(e.page++,e.contentsList=e.contentsList.concat(i)):e.contentsList=i:e.moreText="没有更多数据了"}setTimeout((function(){e.isLoading=1,clearTimeout("timer")}),300)},fail:function(t){e.moreText="加载更多",e.isLoad=0;setTimeout((function(){e.isLoading=1,clearTimeout("timer")}),300)}})},subText:function(t,e){return t.length<null?t.substring(0,e)+"……":t},formatDate:function(t){t=new Date(parseInt(1e3*t));var e=t.getFullYear(),n=("0"+(t.getMonth()+1)).slice(-2),i=("0"+t.getDate()).slice(-2),a=("0"+t.getHours()).slice(-2),s=("0"+t.getMinutes()).slice(-2),o=e+"-"+n+"-"+i+" "+a+":"+s;return o},toInfo:function(t){uni.navigateTo({url:"/pages/contents/info?cid="+t.cid+"&title="+t.title})},formatNumber:function(t){return t>=1e3&&t<1e4?(t/1e3).toFixed(1)+"k":t>=1e4?(t/1e4).toFixed(1)+"w":t},replaceSpecialChar:function(t){return t=t.replace(/&quot;/g,'"'),t=t.replace(/&amp;/g,"&"),t=t.replace(/&lt;/g,"<"),t=t.replace(/&gt;/g,">"),t=t.replace(/&nbsp;/g," "),t}}};e.default=a},a6f3:function(t,e,n){"use strict";n.r(e);var i=n("964b"),a=n.n(i);for(var s in i)["default"].indexOf(s)<0&&function(t){n.d(e,t,(function(){return i[t]}))}(s);e["default"]=a.a},f417:function(t,e,n){"use strict";n.r(e);var i=n("74db"),a=n("a6f3");for(var s in a)["default"].indexOf(s)<0&&function(t){n.d(e,t,(function(){return a[t]}))}(s);var o=n("828b"),c=Object(o["a"])(a["default"],i["b"],i["c"],!1,null,"64806583",null,!1,i["a"],void 0);e["default"]=c.exports}}]);