From 3b80d170106c0728f5df4dbcadf9c79fb69a5b30 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E7=94=B2=E8=BE=B0=E7=94=9F=E4=BA=A7?= Date: Thu, 26 Mar 2026 23:11:20 +0800 Subject: [PATCH] =?UTF-8?q?=E7=89=88=E6=9C=AC=E6=9B=B4=E6=96=B0:=20v1.2.16?= =?UTF-8?q?=20-=20=E4=BF=AE=E5=A4=8D=E4=BF=A1=E6=81=AF=E5=8F=91=E5=B8=83?= =?UTF-8?q?=E8=BE=93=E5=85=A5=E9=97=AE=E9=A2=98?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- frontend/index.html | 2 +- frontend/src/pages/Info.jsx | 8 ++++---- 2 files changed, 5 insertions(+), 5 deletions(-) diff --git a/frontend/index.html b/frontend/index.html index 4ba3980..e17b7ae 100644 --- a/frontend/index.html +++ b/frontend/index.html @@ -4,7 +4,7 @@ - 甲辰收藏 v1.2.15 + 甲辰收藏 v1.2.16 diff --git a/frontend/src/pages/Info.jsx b/frontend/src/pages/Info.jsx index 2cde493..a93782d 100644 --- a/frontend/src/pages/Info.jsx +++ b/frontend/src/pages/Info.jsx @@ -10,7 +10,7 @@ export default function Info() { const [formData, setFormData] = useState({ edition: '龙钞', type: '标百', isGraded: true, category: '成交', source: '直播', title: '' }) - const [content, setContent] = useState('') + // content使用原生DOM useEffect(() => { if (activeTab === 'manage') fetchMyList() @@ -43,14 +43,14 @@ export default function Info() { const token = localStorage.getItem('token') const res = await fetch(`${API_BASE}/api/information/`, { method: 'POST', headers: { 'Authorization': `Bearer ${token}`, 'Content-Type': 'application/json' }, - body: JSON.stringify({ title: formData.title, content: content, info_type: formData.category === '成交' ? 'deal' : 'seek' }) + body: JSON.stringify({ title: formData.title, content: document.getElementById('publishContent')?.value || '', info_type: formData.category === '成交' ? 'deal' : 'seek' }) }) const data = await res.json() if (data.id || data.code === 0) { alert('发布成功!') setShowPublish(false) setFormData({ edition: '龙钞', type: '标百', isGraded: true, category: '成交', source: '直播', title: '' }) - setContent('') + const el = document.getElementById('publishContent'); if(el) el.value = '' fetchMyList() } else { alert(data.message || '发布失败') } } catch (e) { alert('发布失败: ' + e.message) } @@ -184,7 +184,7 @@ export default function Info() {
正文
-