(window["webpackJsonp"]=window["webpackJsonp"]||[]).push([["pages-contents-randlist"],{3700:function(t,e,i){"use strict";i.d(e,"b",(function(){return a})),i.d(e,"c",(function(){return n})),i.d(e,"a",(function(){}));var a=function(){var t=this,e=t.$createElement,a=t._self._c||e;return a("v-uni-view",{staticClass:"userpost",class:[t.isDark?"dark":"",t.AppStyle],style:{"background-color":t.isDark?"#1c1c1c":"#f6f6f6","min-height":t.isDark?"100vh":"auto"}},[a("v-uni-view",{staticClass:"header",style:[{height:t.CustomBar+"px"}]},[a("v-uni-view",{staticClass:"cu-bar",class:t.isDark?"dark":"bg-white",style:{height:t.CustomBar+"px","padding-top":t.StatusBar+"px","background-color":t.isDark?"#1c1c1c":"#ffffff"}},[a("v-uni-view",{staticClass:"action",on:{click:function(e){arguments[0]=e=t.$handleEvent(e),t.back.apply(void 0,arguments)}}},[a("v-uni-text",{staticClass:"cuIcon-back"})],1),a("v-uni-view",{staticClass:"content text-bold",style:[{top:t.StatusBar+"px"}]},[t._v("随机阅读")]),a("v-uni-view",{staticClass:"action",on:{click:function(e){arguments[0]=e=t.$handleEvent(e),t.reload.apply(void 0,arguments)}}},[a("v-uni-text",{staticClass:"cuIcon-refresh"})],1)],1)],1),a("v-uni-view",{style:[{padding:t.NavBar+"px 10px 0px 10px"}]}),a("v-uni-view",{staticClass:"data-box"},[0==t.contentsList.length?a("v-uni-view",{staticClass:"no-data"},[a("v-uni-text",{staticClass:"cuIcon-text"}),t._v("暂时没有数据")],1):t._e(),a("v-uni-view",{staticClass:"cu-card article no-card"},[t._l(t.contentsList,(function(t,e){return[a("articleItem",{key:e+"_0",attrs:{item:t}})]}))],2)],1),0==t.isLoading?a("v-uni-view",{staticClass:"loading"},[a("v-uni-view",{staticClass:"loading-main"},[a("v-uni-image",{attrs:{src:i("ecc7")}})],1)],1):t._e()],1)},n=[]},"43d3":function(t,e,i){"use strict";i.r(e);var a=i("3700"),n=i("56c6");for(var s in n)["default"].indexOf(s)<0&&function(t){i.d(e,t,(function(){return n[t]}))}(s);var o=i("828b"),c=Object(o["a"])(n["default"],a["b"],a["c"],!1,null,"84b15a62",null,!1,a["a"],void 0);e["default"]=c.exports},"56c6":function(t,e,i){"use strict";i.r(e);var a=i("e544"),n=i.n(a);for(var s in a)["default"].indexOf(s)<0&&function(t){i.d(e,t,(function(){return a[t]}))}(s);e["default"]=n.a},e544:function(t,e,i){"use strict";i("6a54");var a=i("f5bd").default;Object.defineProperty(e,"__esModule",{value:!0}),e.default=void 0,i("d4b5"),i("e966"),i("f7a5");var n=i("739a"),s=a(i("2389")),o={mixins:[s.default],data:function(){return{StatusBar:this.StatusBar,CustomBar:this.CustomBar,NavBar:this.StatusBar+this.CustomBar,AppStyle:this.$store.state.AppStyle,contentsList:[],isLoading:0}},onShow:function(){this.getContentsList()},onLoad:function(){},methods:{back:function(){uni.navigateBack({delta:1})},reload:function(){this.getContentsList()},getContentsList:function(){var t=this,e="";if(n.localStorage.getItem("userinfo")){var i=JSON.parse(n.localStorage.getItem("userinfo"));e=i.token}t.$Net.request({url:t.$API.getContentsList(),data:{searchParams:JSON.stringify(t.$API.removeObjectEmptyKey({type:"post"})),limit:10,page:1,random:1,token:e},header:{"Content-Type":"application/x-www-form-urlencoded"},method:"get",dataType:"json",success:function(e){if(1==e.data.code){var i=e.data.data;i.length>0&&(t.contentsList=i)}setTimeout((function(){t.isLoading=1,clearTimeout("timer")}),300)},fail:function(e){uni.showToast({title:"网络开小差了哦",icon:"none"});setTimeout((function(){t.isLoading=1,clearTimeout("timer")}),300)}})},toPost:function(){uni.navigateTo({url:"../edit/articlePost"})},toEdit:function(t){uni.navigateTo({url:"../edit/articlePost?type=edit&cid="+t})},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(),i=("0"+(t.getMonth()+1)).slice(-2),a=("0"+t.getDate()).slice(-2),n=("0"+t.getHours()).slice(-2),s=("0"+t.getMinutes()).slice(-2),o=e+"-"+i+"-"+a+" "+n+":"+s;return o}}};e.default=o}}]);