"}))}function timeago(e){var t=(new Date).getTime()-e;if(!(t<0)){var n=t/6e4,a=t/36e5,r=t/864e5,i=t/6048e5,o=t/2592e6;if(o>=1&&o<=3)result=" "+parseInt(o)+" 月前";else if(i>=1&&i<=3)result=" "+parseInt(i)+" 周前";else if(r>=1&&r<=6)result=" "+parseInt(r)+" 天前";else if(a>=1&&a<=23)result=" "+parseInt(a)+" 小时前";else if(n>=1&&n<=59)result=" "+parseInt(n)+" 分钟前";else if(t>=0&&t<=6e4)result="刚刚";else{var u=new Date;u.setTime(e);var p=u.getMonth()+1<10?"0"+(u.getMonth()+1):u.getMonth()+1,s=u.getDate()<10?"0"+u.getDate():u.getDate();result=p+"-"+s}return result}}function getData(e=0){query.descending("createdAt").skip(10*e).limit(10).find().then((function(e){0==e.length?alert("之前没发表过说说了"):(reqData=!1,e.forEach((e=>{let t=new Date(e.createdAt);e.attributes.time=timeago(t),e.attributes.content=urlToLink(e.attributes.content),app.contents.push(e)})))}),(function(e){}))}getData(0),query.count().then((function(e){app.count=e}),(function(e){}))