feat: 增加圈子

This commit is contained in:
秋水浮尘
2024-04-16 23:26:25 +08:00
parent 00f2d0baf7
commit de66a23d05
6 changed files with 57 additions and 19 deletions

View File

@@ -20,7 +20,7 @@ const MENULIST = [
key: 'practiceQuestions',
title: '鸡圈',
route: '/jichi-club',
finished: false
finished: true
},
{
key: 'interList',

View File

@@ -50,6 +50,10 @@ const router = createBrowserRouter([
{
path: 'practise-analytic/:id',
Component: lazy(() => import('@views/practise/practise-analytic'))
},
{
path: 'jichi-club',
Component: lazy(() => import('@views/chicken-circle'))
}
]
}

View File

View File

@@ -0,0 +1,20 @@
import { Input } from 'antd'
const { TextArea } = Input
const Circle = () => {
return (
<div className='circle-box'>
<div className='top-input-box'>
<TextArea
showCount
maxLength={100}
// onChange={onChange}
placeholder='disable resize'
style={{ height: 120, resize: 'none', outline: 'none' }}
/>
</div>
</div>
)
}
export default Circle

View File

@@ -7,15 +7,15 @@ import './index.less'
const tabList = [
{
key: '1',
key: '0',
tab: '默认'
},
{
key: '2',
key: '1',
tab: '最新'
},
{
key: '3',
key: '2',
tab: '最热'
}
]
@@ -26,7 +26,7 @@ const PaperView = props => {
const [spinning, setSpinning] = useState(false)
const [paperList, setPaperList] = useState([])
const [orderType, setOrderType] = useState('1')
const [orderType, setOrderType] = useState('0')
const [pageInfo, setPageInfo] = useState({
total: 0,
pageIndex: 1
@@ -107,15 +107,26 @@ const PaperView = props => {
onClick={() => handleJump(item.setId)}
key={`paperList_${index}`}
>
<h1 className='paper-box-cardlist-body-item-title'>{item.setName}</h1>
<div className='paper-box-cardlist-body-item-hot'>
热度指数{item.setHeat}
</div>
<div className='paper-box-cardlist-body-item-describe'>
<Tooltip placement='topLeft' title={item.setDesc}>
<span className='hide-3-line'>{item.setDesc}</span>
</Tooltip>
</div>
<h1 className='paper-box-cardlist-body-item-title'>
{item.setName || item.title}
</h1>
{type === 'unfinish' ? (
<div className='paper-box-cardlist-body-item-hot'>
<div>上次练习时间</div>
{item.practiceTime}
</div>
) : (
<>
<div className='paper-box-cardlist-body-item-hot'>
热度指数{item.setHeat}
</div>
<div className='paper-box-cardlist-body-item-describe'>
<Tooltip placement='topLeft' title={item.setDesc}>
<span className='hide-3-line'>{item.setDesc}</span>
</Tooltip>
</div>
</>
)}
</div>
)
})

View File

@@ -63,7 +63,7 @@ export default function RankingBox(props) {
{rankingList?.length > 0 &&
rankingList.map((item, index) => {
return (
<div className='ranking-item' key={item.id}>
<div className='ranking-item' key={index}>
<div className='ranking-left'>
<div
className='ranking-icon'
@@ -74,24 +74,27 @@ export default function RankingBox(props) {
{index > 2 && index + 1}
</div>
<div className='ranking-head-img'>
<img src={item.createUserAvatar} className='ranking-head-icon' />
<img
src={item.createUserAvatar || item.avatar}
className='ranking-head-icon'
/>
</div>
<Popover
title={<div>{item.createUser}</div>}
content={
<div className='tooltip-info'>
<div>{item.createUser}</div>
<div>{item.createUser || item.name}</div>
{/* <div>{item.organizationFullName}</div> */}
</div>
}
>
<div className='ranking-info'>
<div className='ranking-name'>{item.createUser}</div>
<div className='ranking-name'>{item.createUser || item.name}</div>
{/* <div className="ranking-department">{item.organizationName}</div> */}
</div>
</Popover>
</div>
<div className='ranking-right'>🔥 {item.subjectCount}</div>
<div className='ranking-right'>🔥 {item.subjectCount || item.count}</div>
</div>
)
})}