"use strict";(wx["webpackJsonp"]=wx["webpackJsonp"]||[]).push([[493],{8868:function(s,n,e){var t=e(8870),a=e(1212),c=e(9379),i=e(467),r=e(5544),o=e(6540),l=e(758),u=e.n(l),p=e(118),m=e(374),h=e(3401),d=e(3972),f=e(7896),_=e(4149),v=e(994),y=e(4848);function x(){var s=(0,m.v)(),n=s.statusBarHeight,e=(0,o.useState)([]),t=(0,r.A)(e,2),x=t[0],j=t[1],k=(0,o.useState)(!0),b=(0,r.A)(k,2),A=b[0],w=b[1],N=(0,v.d)(480),S=function(){w(!0),(0,_.hv)().then(j).finally(function(){return w(!1)})};(0,o.useEffect)(function(){S()},[]),(0,l.useDidShow)(S);var g=function(){var s=(0,i.A)((0,a.A)().m(function s(n){var e,t;return(0,a.A)().w(function(s){while(1)switch(s.n){case 0:if(e=x.map(function(s){if(s._id!==n)return s;var e=!s.likedByMe;return e&&N.show(),(0,c.A)((0,c.A)({},s),{},{likedByMe:e,counts:(0,c.A)((0,c.A)({},s.counts),{},{likes:Math.max(0,s.counts.likes+(e?1:-1))})})}),j(e),t=e.find(function(s){return s._id===n}),!t){s.n=1;break}return s.n=1,(0,_.O$)(n,t.likedByMe);case 1:return s.a(2)}},s)}));return function(n){return s.apply(this,arguments)}}();return(0,y.jsxs)(p.Ss,{className:"my-posts",children:[(0,y.jsx)(p.Ss,{className:"my-posts__nav",style:{paddingTop:"".concat(n,"px")},children:(0,y.jsxs)(p.Ss,{className:"my-posts__nav-row",children:[(0,y.jsx)(p.Ss,{className:"my-posts__back",onClick:function(){return u().navigateBack()},children:(0,y.jsx)(h.A,{name:"chev",size:22,className:"my-posts__back-icon"})}),(0,y.jsx)(p.EY,{className:"my-posts__title",children:"\u6211\u7684\u52a8\u6001"}),(0,y.jsx)(p.Ss,{className:"my-posts__nav-spacer"})]})}),(0,y.jsx)(p.BM,{scrollY:!0,className:"my-posts__scroll",enhanced:!0,showScrollbar:!1,children:(0,y.jsxs)(p.Ss,{className:"my-posts__feed",children:[x.map(function(s){return(0,y.jsx)(d.A,{post:s,onLike:g,onOpen:function(s){return u().navigateTo({url:"/pages/post-detail/index?postId=".concat(s)})}},s._id)}),A&&0===x.length?(0,y.jsx)(p.EY,{className:"my-posts__empty",children:"\u52a0\u8f7d\u4e2d\u2026"}):A||0!==x.length?null:(0,y.jsx)(p.EY,{className:"my-posts__empty",children:"\u8fd8\u6ca1\u6709\u53d1\u5e03\u8fc7\u52a8\u6001\uff0c\u53bb\u5e7f\u573a\u70b9 + \u53d1\u5e03\u7b2c\u4e00\u6761\u5427"})]})}),(0,y.jsx)(f.A,{visible:N.visible})]})}var j={},k=(0,t.eU)(x,"pages/my-posts/index",{root:{cn:[]}},j||{});x&&x.behaviors&&(k.behaviors=(k.behaviors||[]).concat(x.behaviors));Page(k)}},function(s){var n=function(n){return s(s.s=n)};s.O(0,[907,96,76],function(){return n(8868)});s.O()}]);