diff --git a/config/VERSION b/config/VERSION index 8f8608d..5b54187 100644 --- a/config/VERSION +++ b/config/VERSION @@ -1 +1 @@ -VERSION=1.2.15 +VERSION=1.2.16 diff --git a/frontend/index.html b/frontend/index.html index 9b51ba8..4ba3980 100644 --- a/frontend/index.html +++ b/frontend/index.html @@ -4,7 +4,7 @@ - 甲辰收藏 v1.2.14 + 甲辰收藏 v1.2.15 diff --git a/frontend/src/pages/Info.jsx b/frontend/src/pages/Info.jsx index 64780ad..2cde493 100644 --- a/frontend/src/pages/Info.jsx +++ b/frontend/src/pages/Info.jsx @@ -8,13 +8,15 @@ export default function Info() { const [editingItem, setEditingItem] = useState(null) const [formData, setFormData] = useState({ - edition: '龙钞', type: '标百', isGraded: true, category: '成交', source: '直播', title: '', content: '' + edition: '龙钞', type: '标百', isGraded: true, category: '成交', source: '直播', title: '' }) + const [content, setContent] = useState('') useEffect(() => { if (activeTab === 'manage') fetchMyList() }, [activeTab]) + // 自动生成标题 useEffect(() => { const now = new Date() const date = `${now.getFullYear()}/${now.getMonth() + 1}/${now.getDate()}` @@ -41,13 +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: formData.content, info_type: formData.category === '成交' ? 'deal' : 'seek' }) + body: JSON.stringify({ title: formData.title, content: content, 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: '', content: '' }) + setFormData({ edition: '龙钞', type: '标百', isGraded: true, category: '成交', source: '直播', title: '' }) + setContent('') fetchMyList() } else { alert(data.message || '发布失败') } } catch (e) { alert('发布失败: ' + e.message) } @@ -109,10 +112,10 @@ export default function Info() { {/* 顶部标签 */}
- {[{ key: 'publish', label: '📝 发布行情', icon: '📝' }, { key: 'manage', label: '📋 发布管理', icon: '📋' }].map(t => ( + {[{ key: 'publish', label: '📝 寻配号发布' }, { key: 'manage', label: '📋 发布管理' }].map(t => (
setActiveTab(t.key)} style={{ flex: 1, padding: '12px 16px', borderRadius: '10px', background: activeTab === t.key ? 'linear-gradient(135deg, #3b82f6 0%, #2563eb 100%)' : 'transparent', - color: activeTab === t.key ? '#fff' : '#9ca3af', cursor: 'pointer', textAlign: 'center', fontSize: '14px', fontWeight: '600', transition: 'all 0.3s', boxShadow: activeTab === t.key ? '0 2px 10px rgba(59,130,246,0.4)' : 'none' }}> + color: activeTab === t.key ? '#fff' : '#9ca3af', cursor: 'pointer', textAlign: 'center', fontSize: '14px', fontWeight: '600', transition: 'all 0.3s' }}> {t.label}
))} @@ -120,78 +123,81 @@ export default function Info() {
+ {/* 寻配号发布 - 提示页面 */} {activeTab === 'publish' && ( -
- {/* 新增按钮 */} -
- -
- - {showPublish && ( - - setFormData({...formData, edition: v})} /> - -
-
-
类型
-
- {['标百', '标十', '单张'].map(t => ( - - ))} -
-
-
-
是否评级
- -
-
- - setFormData({...formData, category: v})} /> - - setFormData({...formData, source: v})} /> - -
-
标题(自动生成)
- -
- -
-
正文内容
-