v0.1.1 - 认购功能优化(已结束群灰色显示、标题显示)
This commit is contained in:
parent
1fef5177f3
commit
5a5ec0ee2c
|
|
@ -1,55 +1,22 @@
|
|||
{
|
||||
"version": "0.0.12",
|
||||
"updated": "2026-04-24",
|
||||
"version": "0.1.1",
|
||||
"updated": "2026-04-29",
|
||||
"modules": {
|
||||
"frontend": {
|
||||
"version": "0.0.12",
|
||||
"version": "0.1.1",
|
||||
"pages": {
|
||||
"Add": "0.0.1",
|
||||
"Admin": "0.0.1",
|
||||
"Detail": "0.0.1",
|
||||
"Edit": "0.0.1",
|
||||
"Home": "0.0.7",
|
||||
"List": "0.0.1",
|
||||
"Login": "0.0.1",
|
||||
"News": "0.0.8",
|
||||
"News_YichensBoard": "0.0.1",
|
||||
"Settings": "0.0.1",
|
||||
"Stats": "0.0.1",
|
||||
"YichensBoard": "0.0.3"
|
||||
},
|
||||
"config": {
|
||||
"version": "0.0.7"
|
||||
"Home": "0.1.0",
|
||||
"Purchase": "0.1.1"
|
||||
}
|
||||
},
|
||||
"backend": {
|
||||
"version": "0.0.12",
|
||||
"version": "0.1.1",
|
||||
"routers": {
|
||||
"auth": "0.0.1",
|
||||
"collections": "0.0.1",
|
||||
"deal": "0.0.1",
|
||||
"information": "0.0.2",
|
||||
"news": "0.0.1",
|
||||
"ocr": "0.0.1",
|
||||
"operations": "0.0.1",
|
||||
"seek": "0.0.9",
|
||||
"users": "0.0.1",
|
||||
"yichens": "0.0.1"
|
||||
"purchase": "0.1.0"
|
||||
},
|
||||
"app": {
|
||||
"core": "0.0.1",
|
||||
"models": "0.0.1",
|
||||
"schemas": "0.0.1",
|
||||
"services": "0.0.1",
|
||||
"utils": "0.0.1"
|
||||
"models": {
|
||||
"purchase": "0.1.0"
|
||||
}
|
||||
}
|
||||
},
|
||||
"changelog": {
|
||||
"0.0.9": [
|
||||
"Home.jsx: 修复寻配号数据统计API",
|
||||
"News.jsx: 寻配号功能稳定版(自有匹配+网络匹配缓存)",
|
||||
"seek.py: 路由优化,留言功能迁移,缓存机制"
|
||||
]
|
||||
}
|
||||
}
|
||||
|
|
@ -199,27 +199,35 @@ function Purchase() {
|
|||
}
|
||||
|
||||
// 渲染认购群卡片
|
||||
const renderGroupCard = (group, showJoin = false) => (
|
||||
const renderGroupCard = (group, showJoin = false) => {
|
||||
const isMyGroup = myGroups.some(g => g.id === group.id)
|
||||
const isClosed = group.status === 'closed'
|
||||
return (
|
||||
<div
|
||||
key={group.id}
|
||||
onClick={() => viewGroupDetail(group.id)}
|
||||
style={{
|
||||
background: 'linear-gradient(135deg, rgba(59,130,246,0.15) 0%, rgba(59,130,246,0.05) 100%)',
|
||||
background: isClosed ? 'rgba(80,80,80,0.3)' : isMyGroup ? 'linear-gradient(135deg, rgba(16,185,129,0.15) 0%, rgba(16,185,129,0.05) 100%)' : 'linear-gradient(135deg, rgba(59,130,246,0.15) 0%, rgba(59,130,246,0.05) 100%)',
|
||||
borderRadius: '12px',
|
||||
padding: '16px',
|
||||
border: '1px solid rgba(59,130,246,0.2)',
|
||||
border: isClosed ? '1px solid rgba(100,100,100,0.3)' : isMyGroup ? '1px solid rgba(16,185,129,0.2)' : '1px solid rgba(59,130,246,0.2)',
|
||||
cursor: 'pointer',
|
||||
marginBottom: '12px'
|
||||
marginBottom: '12px',
|
||||
opacity: isClosed ? 0.7 : 1
|
||||
}}
|
||||
>
|
||||
<div style={{ display: 'flex', justifyContent: 'space-between', alignItems: 'center' }}>
|
||||
<div>
|
||||
<div style={{ color: '#fff', fontSize: '16px', fontWeight: 'bold' }}>{group.name}</div>
|
||||
<div style={{ color: isClosed ? '#999' : '#fff', fontSize: '16px', fontWeight: 'bold' }}>{group.name} {isClosed && '(已结束)'}</div>
|
||||
<div style={{ color: 'rgba(255,255,255,0.5)', fontSize: '12px', marginTop: '4px' }}>
|
||||
群主: {group.creator_name} · {group.total_members}人参与
|
||||
编码:{group.group_code} · 群主:{group.creator_name} · {group.total_members}人参与
|
||||
</div>
|
||||
</div>
|
||||
{showJoin && (
|
||||
{isClosed ? (
|
||||
<div style={{ background: '#555', color: '#aaa', borderRadius: '6px', padding: '8px 12px', fontSize: '12px' }}>已结束</div>
|
||||
) : isMyGroup ? (
|
||||
<div style={{ background: '#10b981', color: '#fff', borderRadius: '6px', padding: '8px 16px', fontSize: '13px' }}>已加入</div>
|
||||
) : showJoin && (
|
||||
<button
|
||||
onClick={(e) => { e.stopPropagation(); joinGroup(group.id) }}
|
||||
style={{
|
||||
|
|
@ -242,7 +250,8 @@ function Purchase() {
|
|||
<span>均价: {formatMoney(group.avg_price)}</span>
|
||||
</div>
|
||||
</div>
|
||||
)
|
||||
)
|
||||
}
|
||||
|
||||
// 群详情弹窗
|
||||
if (selectedGroup) {
|
||||
|
|
@ -269,7 +278,7 @@ function Purchase() {
|
|||
←
|
||||
</button>
|
||||
<div style={{ flex: 1 }}>
|
||||
<div style={{ fontSize: '18px', fontWeight: 'bold' }}>{selectedGroup.name}</div>
|
||||
<div style={{ fontSize: '18px', fontWeight: 'bold' }}>{selectedGroup.name} {selectedGroup.status === 'closed' ? '(已结束)' : ''}</div>
|
||||
<div style={{ fontSize: '12px', color: 'rgba(255,255,255,0.5)' }}>
|
||||
群主: {selectedGroup.creator_name} · {selectedGroup.status === 'active' ? '进行中' : '已结束'}
|
||||
</div>
|
||||
|
|
@ -513,7 +522,7 @@ function Purchase() {
|
|||
cursor: 'pointer'
|
||||
}}
|
||||
>
|
||||
我参与的 ({myGroups.length})
|
||||
我的认购 ({myGroups.length})
|
||||
</button>
|
||||
<button
|
||||
onClick={() => setActiveTab('all')}
|
||||
|
|
@ -528,7 +537,7 @@ function Purchase() {
|
|||
cursor: 'pointer'
|
||||
}}
|
||||
>
|
||||
所有认购群 ({allGroups.length})
|
||||
全部认购群 ({allGroups.length})
|
||||
</button>
|
||||
</div>
|
||||
|
||||
|
|
|
|||
Loading…
Reference in New Issue