修改成交详情列表展示格式
This commit is contained in:
parent
64eb4b921c
commit
161ff51b72
|
|
@ -650,17 +650,24 @@ export default function News() {
|
||||||
<div style={{ display: 'flex', flexDirection: 'column', gap: '8px' }}>
|
<div style={{ display: 'flex', flexDirection: 'column', gap: '8px' }}>
|
||||||
{dealDetailItems.map((item, idx) => {
|
{dealDetailItems.map((item, idx) => {
|
||||||
const content = item.content || ''
|
const content = item.content || ''
|
||||||
const grade = content.includes('评级:') ? content.split('评级:')[1].split('\n')[0].trim() : ''
|
const grade = content.includes('评级:') ? content.split('评级:')[1].split('\n')[0].trim() : (item.grading_score || '')
|
||||||
|
const sizeMatch = content.match(/大小号:\s*(.+?)(?:\n|$)/)
|
||||||
|
const size = sizeMatch ? sizeMatch[1].trim() : ''
|
||||||
|
const platformMatch = content.match(/平台:\s*(.+?)(?:\n|$)/)
|
||||||
|
const platform = platformMatch ? platformMatch[1].trim() : '-'
|
||||||
return (
|
return (
|
||||||
<div key={idx} style={{
|
<div key={idx} style={{
|
||||||
background: 'rgba(255,255,255,0.05)', borderRadius: '8px', padding: '12px',
|
background: 'rgba(255,255,255,0.05)', borderRadius: '8px', padding: '12px',
|
||||||
display: 'flex', justifyContent: 'space-between', alignItems: 'center'
|
display: 'flex', justifyContent: 'space-between', alignItems: 'center'
|
||||||
}}>
|
}}>
|
||||||
<div>
|
<div>
|
||||||
<div style={{ color: '#fbbf24', fontWeight: '600' }}>{(item.title || '').split('-')[0]}</div>
|
<div style={{ color: '#fbbf24', fontWeight: '600', marginBottom: '4px' }}>
|
||||||
<div style={{ color: '#94a3b8', fontSize: '12px', marginTop: '4px' }}>
|
{(item.title || '').split('-')[0]}
|
||||||
{item.deal_date} | {item.category} | {item.packaging}
|
{size && <span style={{ color: '#94a3b8', marginLeft: '8px' }}>| {size}</span>}
|
||||||
{grade && ` | ${grade}`}
|
{grade && <span style={{ color: '#06b6d4', marginLeft: '8px' }}>| {grade}</span>}
|
||||||
|
</div>
|
||||||
|
<div style={{ color: '#94a3b8', fontSize: '12px' }}>
|
||||||
|
{item.deal_date} | {item.category} | {item.packaging} | {platform}
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
<div style={{ color: '#22c55e', fontSize: '18px', fontWeight: '700' }}>
|
<div style={{ color: '#22c55e', fontSize: '18px', fontWeight: '700' }}>
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue