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