From 18b6cfbc1d0286889ab3fab568cd38f523368e69 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E7=94=B2=E8=BE=B0=E7=94=9F=E4=BA=A7?= Date: Fri, 27 Mar 2026 01:20:03 +0800 Subject: [PATCH] =?UTF-8?q?=E7=89=88=E6=9C=AC=E6=9B=B4=E6=96=B0:=20v1.2.18?= =?UTF-8?q?=20-=20=E5=AF=BB=E5=8F=B7=E5=8F=91=E5=B8=83=E5=8A=9F=E8=83=BD?= =?UTF-8?q?=E4=BC=98=E5=8C=96=E7=89=88?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- frontend/index.html | 2 +- frontend/src/pages/News.jsx | 59 +++++++++++++++++++++++++++++-------- 2 files changed, 48 insertions(+), 13 deletions(-) diff --git a/frontend/index.html b/frontend/index.html index e17b7ae..7cebb1a 100644 --- a/frontend/index.html +++ b/frontend/index.html @@ -4,7 +4,7 @@ - 甲辰收藏 v1.2.16 + 甲辰收藏 v1.2.17 diff --git a/frontend/src/pages/News.jsx b/frontend/src/pages/News.jsx index 580fbdb..f49ea06 100644 --- a/frontend/src/pages/News.jsx +++ b/frontend/src/pages/News.jsx @@ -5,7 +5,7 @@ export default function News() { const [activeTab, setActiveTab] = useState('deal') const [showSeekPublish, setShowSeekPublish] = useState(false) const [seekForm, setSeekForm] = useState({ - edition: '龙钞', type: '标百', category: '寻号', price: '', matchType: '模糊', features: '', content: '', title: '', contact: '' + edition: '龙钞', type: '标百', category: '寻号', price: '', matchType: '模糊', features: 'J0', content: '', title: '', contact: '' }) const [infoList, setInfoList] = useState([]) const [loading, setLoading] = useState(false) @@ -19,7 +19,7 @@ export default function News() { // 自动生成寻号标题 useEffect(() => { - const title = `「寻号 ${seekForm.edition} ${seekForm.type} ${seekForm.features || '号码特征'} ${seekForm.matchType}」` + const title = `「寻号 ${seekForm.edition || '龙钞,马钞,蛇钞'} ${seekForm.type} ${seekForm.features || 'J0'} ${seekForm.matchType}」` setSeekForm(prev => ({...prev, title})) }, [seekForm.edition, seekForm.type, seekForm.features, seekForm.matchType]) @@ -53,7 +53,7 @@ export default function News() { if (data.id || data.code === 0) { alert('发布成功!') setShowSeekPublish(false) - setSeekForm({ edition: '龙钞', type: '标百', category: '寻号', price: '', matchType: '模糊', features: '', content: '', title: '', contact: '' }) + setSeekForm({ edition: '龙钞', type: '标百', category: '寻号', price: '', matchType: '模糊', features: 'J0', content: '', title: '', contact: '' }) fetchInfoList() } else { alert(data.message || '发布失败') } } catch (e) { alert('发布失败: ' + e.message) } @@ -100,10 +100,22 @@ export default function News() {
- {['龙钞','马钞','蛇钞','其他'].map(e => ( - - ))} + {['龙钞','马钞','蛇钞'].map(item => { + const isSelected = seekForm.edition ? seekForm.edition.split(',').includes(item) : false + return ( + + ) + })}
@@ -134,9 +146,32 @@ export default function News() { ))}
-
- setSeekForm({...seekForm, features: e.target.value})} placeholder="如: 8888/7777/开门号" - 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 placeholder = isFixed ? (i === 0 ? 'J' : '0') : 'X' + return { if (el) el.dataset.index = i }} type="text" maxLength={1} + value={isFixed ? placeholder : (seekForm.features?.[i] || '')} + readOnly={isFixed} + onChange={(e) => { + if (i < 2) return + const arr = (seekForm.features || 'J0XXXXXXXX').split('') + arr[i] = e.target.value.toUpperCase() + setSeekForm({...seekForm, features: arr.join('')}) + // 输入后自动跳转下一个 + if (e.target.value && i < 9) { + setTimeout(() => { + const nextInput = document.querySelector(`input[data-index="${i+1}"]`) + if (nextInput) nextInput.focus() + }, 0) + } + }} + placeholder={placeholder} + style={{ width: '32px', height: '36px', textAlign: 'center', padding: '6px', background: '#0f172a', border: '1px solid #334155', borderRadius: '4px', color: isFixed ? '#10b981' : '#fff', fontSize: '14px', boxSizing: 'border-box' }} /> + })} +
+
X=任意数字 A=非4 B=非47 C=非347 D=非247 E=非2347 F=非12347 F=非23457 G=非123457