(self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[6399],{26650:function(e,t,s){(window.__NEXT_P=window.__NEXT_P||[]).push(["/news/[[...tag]]",function(){return s(83809)}])},95665:function(e,t,s){"use strict";s.d(t,{X:function(){return h}});var a=s(85893),n=s(91592),r=s(3313),i=s(97210),l=s.n(i),d=s(92718),c=s(46591),o=s(32998),u=s(41664),m=s.n(u),g=s(24596),x=s(54462);let h=e=>{var t,s;let{item:i}=e;return(0,a.jsxs)(m(),{onClick:()=>{(0,x.r)("Link click me items card",{item:i})},"data-testid":"MeItemsCard",href:(0,o.bN)(i)?"/news/detail/".concat(i.slug):(0,o.LD)(i)?"/yellowPage/detail/".concat(i.slug):(0,o.hr)(i)?"/restaurants/detail/".concat(i.slug):(0,o.lg)(i)?"/discounts/detail/".concat(i.slug):null!==(s=i.link)&&void 0!==s?s:"/",className:l().meNewsCard,children:[(0,a.jsxs)("div",{className:l().meNewsCardInfo,children:[(0,a.jsxs)("div",{className:l().meNewsCardTitles,children:[(0,a.jsx)(r.x,{textColor:"Dark",variant:"Title",children:i.title}),(0,a.jsxs)(r.x,{children:[i.description,"..."]})]}),(0,a.jsxs)("div",{className:l().meNewsCardSubInfo,children:[(0,a.jsx)(g.u,{textColor:"Light",user:i.user}),(0,a.jsxs)("div",{className:l().comments,children:[(0,a.jsx)(n.Z,{src:d.ep,className:l().commentsIcon}),(0,a.jsxs)(r.x,{textColor:"Light",children:[i.commentCount,"评论"]})]}),(0,a.jsx)(r.x,{textColor:"Light",children:(0,c.F)(i.createdAt)}),(0,o.bN)(i)&&(null==i?void 0:i.rank)&&(0,a.jsx)("div",{className:" bg-red-600 px-3 py-[2px] font-PingFangSC text-sm text-white",children:"置顶"})]})]}),(0,a.jsx)(n.Z,{width:0,className:l().meNewsCardImage,height:0,src:null===(t=i.featureImage)||void 0===t?void 0:t.src})]})}},17761:function(e,t,s){"use strict";var a=s(85893),n=s(67294),r=s(58533);t.Z=e=>{let{children:t,hasMore:s,loader:i,dataLength:l,next:d,className:c,scrollableTarget:o}=e,[u,m]=(0,n.useState)(1),g=(0,n.useCallback)(()=>{m(e=>e+1)},[]),x=(0,a.jsx)("p",{"data-testid":"EndMessage",style:{textAlign:"center"},children:(0,a.jsx)("b",{children:"已显示全部"})}),h=(0,a.jsx)("p",{style:{textAlign:"center"},children:(0,a.jsx)("b",{children:"加载中..."})});return(0,a.jsx)(r.Z,{next:()=>{d(u),g()},hasMore:s,loader:i||h,dataLength:l,endMessage:x,className:c,scrollableTarget:o,"data-testid":"custominfinitescroll-test-id",children:t})}},83809:function(e,t,s){"use strict";s.r(t),s.d(t,{__N_SSG:function(){return b},default:function(){return T}});var a=s(85893),n=s(46528),r=s(24357),i=s(67294),l=s(99643),d=s(34089),c=s(59659),o=s(95665),u=s(17761),m=s(41664),g=s.n(m),x=s(83393),h=s(66193),f=s(11163),N=s.n(f),w=function(e,t){let s=(0,f.useRouter)(),{clientSideApi:a}=(0,x.Z)(),[n,r]=(0,i.useState)(0),[l,d]=(0,i.useState)(1),[c,o]=(0,i.useState)(e),u=async()=>{var e,s,n,i;let c=await a.articleControllerGetArticlesByTags(l+1,h.U5,void 0,(null==t?void 0:t.includes("全部"))?void 0:t);o(e=>[...e,...c.data.data]),d(null!==(n=null==c?void 0:null===(e=c.data)||void 0===e?void 0:e.page)&&void 0!==n?n:0),r(null!==(i=null==c?void 0:null===(s=c.data)||void 0===s?void 0:s.pageCount)&&void 0!==i?i:0)};return(0,i.useEffect)(()=>{o(e)},[e]),(0,i.useEffect)(()=>{let e=()=>{d(1)};return s.events.on("routeChangeStart",e),()=>{s.events.off("routeChangeStart",e)}},[s.events]),{articles:c,currentPage:l,totalPages:n,setArticles:o,fetchMoreArticles:u}},_=s(98158),j=s(64533);function v(e){let{articles:t,articleTags:s,tags:n,advertisements:r}=e,{currentPage:i,totalPages:m,articles:x,fetchMoreArticles:h}=w(t,n||void 0),f=s.map((e,t)=>({title:e.name,href:"/news/".concat(e.name)}));return(0,a.jsxs)(a.Fragment,{children:[(0,a.jsx)("div",{className:"h-[120px] bg-white",children:(0,a.jsxs)("div",{className:"mx-auto  flex w-full max-w-[1184px] items-center justify-between gap-x-2",children:[(0,a.jsx)(c.N,{text:"广告",src:"/adImages/HomePage_Top_Leaderboard_Big.png",advertisement:(0,_.g)(r,j.po.HomePageTopLeaderboardBig),className:"object-contain "}),(0,a.jsx)(c.N,{src:"/adImages/HomePage_Top_Leaderboard_Small.jpg",advertisement:(0,_.g)(r,j.po.HomePageTopLeaderboardSmall),className:"object-contain"})]})}),(0,a.jsxs)(l.f,{children:[(0,a.jsx)(d.P,{tabsList:[{title:"全部",href:"/news/全部"},...f]}),(0,a.jsx)("div",{className:" mx-auto w-full max-w-[1184px]",id:"profileScrollDiv",children:(0,a.jsxs)(u.Z,{hasMore:i!==m,dataLength:x.length,loader:(0,a.jsx)(a.Fragment,{}),next:e=>{h()},className:"flex flex-col gap-4",children:[(0,a.jsx)("div",{className:"w-full max-w-[1184px]",children:(0,a.jsx)(c.N,{src:"/adImages/HomePage_Top_Leaderboard_Big.png",advertisement:(0,_.g)(r,j.po.DesktopTopArticleTagPage),className:"max-h-[111px] object-contain",height:"Auto"})}),x.map(e=>(0,a.jsx)(g(),{onClick:()=>{},href:"/news/detail/".concat(e.slug),"data-testid":"newslist-test-id",children:(0,a.jsx)(o.X,{item:e})},e.id))]})})]})]})}var p=s(9008),C=s.n(p),b=!0;function T(e){let{mobile:t,desktop:s,tags:i}=e;return t&&s||N().reload(),(0,a.jsxs)(a.Fragment,{children:[(0,a.jsx)(C(),{children:(0,a.jsxs)("title",{children:["新闻 - ",null==i?void 0:i[0]]})}),(0,a.jsx)(n.f,{desktopPage:(0,a.jsx)(v,{...s}),mobilePage:(0,a.jsx)(r.Z,{...t})})]})}},32998:function(e,t,s){"use strict";s.d(t,{LD:function(){return a},bN:function(){return i},hr:function(){return n},kq:function(){return r},lg:function(){return l}});let a=e=>"yellowPageTags"in e||"yellowPageSubCategories"in e||"favYellowPage"in e,n=e=>"restaurantTags"in e,r=e=>"numberOfLike"in e,i=e=>"articleTags"in e||"articleType"in e,l=e=>"discountTags"in e||"discountDescription"in e},97210:function(e){e.exports={meNewsCard:"meNewsCard_meNewsCard__RcvV6",meNewsCardInfo:"meNewsCard_meNewsCardInfo__3g8YV",meNewsCardTitles:"meNewsCard_meNewsCardTitles__s0G1W",meNewsCardSubInfo:"meNewsCard_meNewsCardSubInfo__inX5M",meNewsCardImage:"meNewsCard_meNewsCardImage__V1KGn",comments:"meNewsCard_comments__7z8ig",commentsIcon:"meNewsCard_commentsIcon__QyQ2P"}}},function(e){e.O(0,[8480,2004,8117,2888,9774,179],function(){return e(e.s=26650)}),_N_E=e.O()}]);