+
+
+ {['龙钞','马钞','蛇钞'].map(item => {
+ const isSelected = seekForm.edition ? seekForm.edition.split(',').includes(item) : false
+ return (
+
+ )
+ })}
+
+
+
+ setSeekForm({...seekForm, price: e.target.value})} placeholder="请输入价格"
+ style={{ width: '100%', padding: '8px', marginTop: '6px', background: '#0f172a', border: '1px solid #334155', borderRadius: '6px', color: '#fff', fontSize: '13px', boxSizing: 'border-box' }} />
+
+
+
+ {[0,1,2,3,4,5,6,7,8,9].map(i => {
+ const isFixed = i < 2
+ const char = i === 0 ? 'J' : (i === 1 ? '0' : (seekForm.features[i - 2] || ''))
+ const isDigit = /[0-9]/.test(char)
+ const letterColor = isFixed ? '#10b981' : (isDigit ? '#fff' : ({ X: '#94a3b8', A: '#f472b6', B: '#60a5fa', C: '#34d399', D: '#fbbf24', E: '#a78bfa', F: '#fb923c', G: '#22d3ee' }[char] || '#fff'))
+ return { if (el) el.dataset.index = i }} type="text" maxLength={1}
+ value={char}
+ readOnly={isFixed}
+ onChange={(e) => {
+ if (i < 2) return
+ const val = e.target.value.toUpperCase().replace(/[^0-9XABCFG]/g, '')
+ const newFeatures = (seekForm.features || '').split('')
+ while (newFeatures.length < 8) newFeatures.push('')
+ newFeatures[i - 2] = val
+ setSeekForm({...seekForm, features: newFeatures.join('')})
+ // 自动跳转下一个
+ if (val && i < 9) {
+ setTimeout(() => {
+ const nextInput = document.querySelector(`input[data-index="${i+1}"]`)
+ if (nextInput) nextInput.focus()
+ }, 50)
+ }
+ }}
+ onKeyDown={(e) => {
+ // 按Delete或Backspace且当前为空时,跳回前一个
+ if ((e.key === 'Backspace' || e.key === 'Delete') && !char && i > 2) {
+ setTimeout(() => {
+ const prevInput = document.querySelector(`input[data-index="${i-1}"]`)
+ if (prevInput) prevInput.focus()
+ }, 50)
+ }
+ }}
+ style={{ width: '32px', height: '36px', textAlign: 'center', padding: '6px', background: '#0f172a', border: '1px solid #334155', borderRadius: '4px', color: letterColor, fontSize: '14px', boxSizing: 'border-box' }} />
+ })}
+
+
+ 备注说明:X=任意数字 A=非4 B=非47 C=非347 D=非247 E=非2347 F=非23457 G=非123457
+
+
+
+ setSeekForm({...seekForm, title: e.target.value})} />
+
+
+
+
+ setSeekForm({...seekForm, contact: e.target.value})} placeholder="请输入手机号或微信"
+ style={{ width: '100%', padding: '8px', marginTop: '6px', background: '#0f172a', border: '1px solid #334155', borderRadius: '6px', color: '#fff', fontSize: '13px', boxSizing: 'border-box' }} />
+
+
+
+
+
+
+ {activeTab === 'seek' ? '🔍 寻配号信息' : '💰 成交行情信息'}
+ {activeTab === 'seek' && (
+
+
+
+
+
+
+ )}
+ 加载中...
+ {infoList.map(item => {
+ // 解析正文中的号码特征和联系方式
+ const content = item.content || ''
+ const featuresMatch = content.match(/号码特征[:\s]*(.+?)(?:\n|$)/)
+ const contactMatch = content.match(/联系方式[:\s]*(.+?)(?:\n|$)/)
+ const features = featuresMatch ? featuresMatch[1].trim() : ''
+ const contact = contactMatch ? contactMatch[1].trim() : ''
+ // 去除正文中的价格、号码特征、联系方式
+ const cleanContent = content.replace(/价格[:\s]*.+?(\n|$)/g, '').replace(/号码特征[:\s]*.+?(\n|$)/g, '').replace(/联系方式[:\s]*.+?(\n|$)/g, '').trim()
+
+ return (
+
+ {/* 标题 */}
+
+ {item.title}
+
+ {/* 创建日期 + 用户名 */}
+
+ 📅 {formatDate(item.created_at)} | 👤 {item.user_name || '匿名用户'}
+
+ {/* 号码特征 */}
+ {features && (
+
+
号码特征:
+
+ {/* 如果features已包含J0则不再重复添加 */}
+ {features.startsWith('J0') ? (
+ features.split('').map((char, i) => {
+ const isDigit = /[0-9]/.test(char)
+ const letterColor = isDigit ? '#fff' : ({ X: '#94a3b8', A: '#f472b6', B: '#60a5fa', C: '#34d399', D: '#fbbf24', E: '#a78bfa', F: '#fb923c', G: '#22d3ee' }[char] || '#fff')
+ return {char}
+ })
+ ) : (
+ <>
+ {'J0'.split('').map((char, i) => (
+ {char}
+ ))}
+ {features.split('').map((char, i) => {
+ const isDigit = /[0-9]/.test(char)
+ const letterColor = isDigit ? '#fff' : ({ X: '#94a3b8', A: '#f472b6', B: '#60a5fa', C: '#34d399', D: '#fbbf24', E: '#a78bfa', F: '#fb923c', G: '#22d3ee' }[char] || '#fff')
+ return {char}
+ })}
+ >
+ )}
+
+ {/* 动态显示用到的字母说明 */}
+ {features.match(/[XABCFG]/) && (
+
+ 备注说明:{(() => {
+ const used = []
+ if (features.includes('X')) used.push('X=任意数字')
+ if (features.includes('A')) used.push('A=非4')
+ if (features.includes('B')) used.push('B=非47')
+ if (features.includes('C')) used.push('C=非347')
+ if (features.includes('D')) used.push('D=非247')
+ if (features.includes('E')) used.push('E=非2347')
+ if (features.includes('F')) used.push('F=非23457')
+ if (features.includes('G')) used.push('G=非123457')
+ return used.join(' | ')
+ })()}
+
+ )}
+
+ )}
+ {/* 配号结果 - 仅寻配号显示 */}
+ {activeTab === 'seek' && (
+
+ fetchMatchCollections(item.id)}
+ >
+ 配号结果: {item.matched_count || 0}条藏品匹配成功
+
+
+ )}
+ {/* 正文 */}
+ {cleanContent && (
+
+ {cleanContent}
+
+ )}
+ {/* 联系方式 - 默认隐藏,显示*** */}
+ {contact && (
+
+
联系方式
+
+ 联系方式:{showContactId === item.id ? contact : '匹配成功后可查看'}
+
+
+ {/* 是否匹配按钮 - 仅对已登录用户显示 */}
+ {currentUser && (
+
+
+ {(item.is_matched === 'matched' || matchedStatus[item.id] === 'matched') ? '已经匹配' : '尚未匹配'}
+ {(item.is_matched === 'matched' || matchedStatus[item.id] === 'matched') && }
+
+
+ )}
+
+ {/* 匹配并联系藏友 / 留言藏友 按钮 - 有匹配藏品才可点击 */}
+ {currentUser && (
+
+
+
+
+ )}
+
+ {/* 留言区域 */}
+ {showCommentId === item.id && (
+
+ {/* 评论列表 */}
+ {comments[item.id] && comments[item.id].length > 0 && (
+
+ {comments[item.id].map((c, idx) => (
+
+
{c.user_name || '匿名用户'}
+
{c.content}
+
+ ))}
+
+ )}
+ {/* 评论输入框 */}
+
+ setCommentText(e.target.value)}
+ placeholder="输入留言..."
+ style={{
+ flex: 1,
+ padding: '8px',
+ background: '#1e293b',
+ border: '1px solid #334155',
+ borderRadius: '4px',
+ color: '#fff',
+ fontSize: '13px'
+ }}
+ />
+
+
+
+ )}
+
+ )}
+
+ )
+ })}
+