From 188458d2bcb6c2a38860ea9950acd8f037f1dbbf Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E7=94=B2=E8=BE=B0=E7=94=9F=E4=BA=A7?= Date: Sun, 29 Mar 2026 17:09:10 +0800 Subject: [PATCH] =?UTF-8?q?v1.2.26=20-=20Info=E9=A1=B5=E9=9D=A2=E4=BF=AE?= =?UTF-8?q?=E5=A4=8D=EF=BC=9A=E5=AF=BB=E9=85=8D=E5=8F=B7=E5=8F=91=E5=B8=83?= =?UTF-8?q?=E6=94=B9=E4=B8=BA=E7=8B=AC=E7=AB=8B=E9=A1=B5=E9=9D=A2=EF=BC=8C?= =?UTF-8?q?=E6=96=B0=E5=A2=9E=E8=A1=8C=E6=83=85=E5=8F=91=E5=B8=83=E4=BF=9D?= =?UTF-8?q?=E6=8C=81=E5=8E=9F=E6=9C=89=E6=A0=B7=E5=BC=8F?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- VERSION | 2 +- config/VERSION | 2 +- frontend/index.html | 2 +- frontend/src/pages/Info.jsx | 355 ++++++++++++++++++++++-------------- 4 files changed, 222 insertions(+), 139 deletions(-) diff --git a/VERSION b/VERSION index 445399f..93e5fdb 100644 --- a/VERSION +++ b/VERSION @@ -1 +1 @@ -VERSION=1.2.25 +VERSION=1.2.26 diff --git a/config/VERSION b/config/VERSION index 445399f..93e5fdb 100644 --- a/config/VERSION +++ b/config/VERSION @@ -1 +1 @@ -VERSION=1.2.25 +VERSION=1.2.26 diff --git a/frontend/index.html b/frontend/index.html index fb6842a..9bc54bb 100644 --- a/frontend/index.html +++ b/frontend/index.html @@ -4,7 +4,7 @@ - 甲辰收藏 v1.2.24 + 甲辰收藏 v1.2.25 diff --git a/frontend/src/pages/Info.jsx b/frontend/src/pages/Info.jsx index 449a491..c26ccd7 100644 --- a/frontend/src/pages/Info.jsx +++ b/frontend/src/pages/Info.jsx @@ -11,6 +11,7 @@ export default function Info() { // 顶部tab:寻配号发布 / 发布管理 const [activeTab, setActiveTab] = useState('publish') const [showPublish, setShowPublish] = useState(false) + const [publishType, setPublishType] = useState('deal') // 'seek' 或 'deal' const [myList, setMyList] = useState([]) const [loading, setLoading] = useState(false) const [editingItem, setEditingItem] = useState(null) @@ -20,9 +21,9 @@ export default function Info() { edition: '龙钞', type: '标百', isGraded: true, category: '成交', source: '直播', title: '' }) - // 寻配号发布表单(新版) + // 寻配号发布表单 const [seekForm, setSeekForm] = useState({ - edition: '龙钞,马钞,蛇钞', price: '', features: '', contact: '', content: '' + edition: '龙钞', price: '', features: '', contact: '', content: '', title: '' }) const API_BASE = localStorage.getItem('API_BASE') || '' @@ -32,9 +33,18 @@ export default function Info() { }, [activeTab]) useEffect(() => { - // 自动生成标题 + // 自动生成行情标题 + const now = new Date() + const date = `${now.getFullYear()}/${now.getMonth()+1}/${now.getDate()}` + const grade = formData.isGraded ? '(评级币)' : '(裸钞)' + const title = `「${date} ${formData.edition} ${formData.type} ${formData.category} 行情信息${grade}」` + setFormData(prev => ({ ...prev, title })) + }, [formData.edition, formData.type, formData.isGraded, formData.category]) + + useEffect(() => { + // 自动生成寻配号标题 if (seekForm.edition || seekForm.features) { - const title = `「寻号 ${seekForm.edition || '龙钞,马钞,蛇钞'} J0${seekForm.features || 'XXXXXXXX'}」` + const title = `「寻号 ${seekForm.edition} J0${seekForm.features || 'XXXXXXXX'}」` setSeekForm(prev => ({ ...prev, title })) } }, [seekForm.edition, seekForm.features]) @@ -82,7 +92,7 @@ export default function Info() { if (data.id || data.code === 0) { alert('发布成功!') setShowPublish(false) - setSeekForm({ edition: '龙钞,马钞,蛇钞', price: '', features: '', contact: '', content: '', title: '' }) + setSeekForm({ edition: '龙钞', price: '', features: '', contact: '', content: '', title: '' }) const contentEl = document.getElementById('seekContent') if (contentEl) contentEl.value = '' fetchMyList() @@ -94,7 +104,7 @@ export default function Info() { } } - // 发布行情 + // 发布行情(新增发布默认是行情) const handlePublishDeal = async () => { const content = document.getElementById('publishContent')?.value || '' if (!formData.title) { @@ -236,188 +246,261 @@ export default function Info() {
{/* 寻配号发布页 */} {activeTab === 'publish' && ( -
-
📝
-
寻配号发布
-
请到「发布管理」tab进行发布
+
+

🔍 寻配号发布

+ +
+
+ +
+ {['龙钞', '马钞', '蛇钞'].map(ed => { + const selected = seekForm.edition === ed + return ( + + ) + })} +
+
+ +
+ + setSeekForm({ ...seekForm, features: e.target.value.toUpperCase().slice(0, 8) })} + placeholder="输入号码特征,如:12345678" + maxLength={8} + style={{ width: '100%', padding: '12px', background: '#1f2937', border: '1px solid #374151', borderRadius: '10px', color: '#fff', fontSize: '14px', boxSizing: 'border-box' }} + /> +
X=任意数字 A=非4 B=非47 C=非347 D=非247
+
+ +
+ + +
+ +
+ +