恢复显示最新一尘发帖
This commit is contained in:
parent
4429d4a2a1
commit
f7fd2ee77d
|
|
@ -112,16 +112,9 @@ export default function Home() {
|
|||
setDragonStats(data || {})
|
||||
}).catch(() => {})
|
||||
|
||||
fetch('/api/yichens/posts?limit=50&offset=0').then(res => res.json()).then(data => {
|
||||
// 过滤出带4/通货相关的分类 AND 包含标十关键字
|
||||
const filtered = (data.posts || data || []).filter(item => {
|
||||
const title = item.title || ''
|
||||
const cat = item.category || ''
|
||||
const hasBiaoshi = title.includes('标十')
|
||||
const hasDai4 = cat.includes('带4') || cat.includes('通货')
|
||||
return hasBiaoshi && hasDai4
|
||||
})
|
||||
setRecentPosts(filtered)
|
||||
// 获取最新一尘帖子
|
||||
fetch('/api/yichens/posts?limit=20&offset=0').then(res => res.json()).then(data => {
|
||||
setRecentPosts(data.posts || data || [])
|
||||
}).catch(() => {})
|
||||
|
||||
// 获取寻配号统计数据
|
||||
|
|
@ -438,7 +431,7 @@ export default function Home() {
|
|||
{/* 最新一尘发帖 */}
|
||||
<div>
|
||||
<div style={{ display: 'flex', justifyContent: 'space-between', alignItems: 'center', marginBottom: '12px', paddingLeft: '4px' }}>
|
||||
<div style={{ color: 'rgba(255,255,255,0.7)', fontSize: '14px' }}>📝 一尘带4标十收购贴</div>
|
||||
<div style={{ color: 'rgba(255,255,255,0.7)', fontSize: '14px' }}>📝 最新一尘发帖</div>
|
||||
<div onClick={() => window.location.hash = '#/news'} style={{ color: '#3b82f6', fontSize: '12px', cursor: 'pointer' }}>查看全部 →</div>
|
||||
</div>
|
||||
<div style={{
|
||||
|
|
|
|||
Loading…
Reference in New Issue