修复一尘数据获取

This commit is contained in:
甲辰生产 2026-04-12 00:11:15 +08:00
parent ce25eee450
commit 4429d4a2a1
1 changed files with 6 additions and 3 deletions

View File

@ -112,11 +112,14 @@ export default function Home() {
setDragonStats(data || {}) setDragonStats(data || {})
}).catch(() => {}) }).catch(() => {})
fetch('/api/yichens/posts?limit=20&offset=0&keyword=标十').then(res => res.json()).then(data => { fetch('/api/yichens/posts?limit=50&offset=0').then(res => res.json()).then(data => {
// 4/ // 4/ AND
const filtered = (data.posts || data || []).filter(item => { const filtered = (data.posts || data || []).filter(item => {
const title = item.title || ''
const cat = item.category || '' const cat = item.category || ''
return cat.includes('带4') || cat.includes('通货') const hasBiaoshi = title.includes('标十')
const hasDai4 = cat.includes('带4') || cat.includes('通货')
return hasBiaoshi && hasDai4
}) })
setRecentPosts(filtered) setRecentPosts(filtered)
}).catch(() => {}) }).catch(() => {})