Commit 3fbcff3b by wangshuo

组队开宝箱

parent 51fcf7fe
...@@ -34,7 +34,7 @@ export default class TeamInfo extends Component { ...@@ -34,7 +34,7 @@ export default class TeamInfo extends Component {
prize_info, prize_info,
is_my_team, is_my_team,
info, info,
member, member: this.format(member)
}) })
} else { } else {
Toast.info(msg); Toast.info(msg);
...@@ -42,6 +42,18 @@ export default class TeamInfo extends Component { ...@@ -42,6 +42,18 @@ export default class TeamInfo extends Component {
}) })
} }
format = (list) => {
let len = list.length;
for(let i=0;i<5-len;i++) {
list.push({
head_img: '',
user_name: '',
nobody: true,
})
}
return list;
}
render() { render() {
const { prize_info: { name, stage_no }, is_my_team, info: {removable, total}, member } = this.state; const { prize_info: { name, stage_no }, is_my_team, info: {removable, total}, member } = this.state;
// 显示文案控制 // 显示文案控制
...@@ -62,7 +74,18 @@ export default class TeamInfo extends Component { ...@@ -62,7 +74,18 @@ export default class TeamInfo extends Component {
member && member.length > 0 && ( member && member.length > 0 && (
member.map((item, index) => { member.map((item, index) => {
return <li key={index} className='member__item'> return <li key={index} className='member__item'>
<div className='avatar__container'>
{
item.nobody ? (
<img className='head__image' src="https://julyedu-cdn.oss-cn-beijing.aliyuncs.com/newyear20/H5/default-member-avatar.png" alt=""/> <img className='head__image' src="https://julyedu-cdn.oss-cn-beijing.aliyuncs.com/newyear20/H5/default-member-avatar.png" alt=""/>
) : (
<img className='head__image' src={item.head_img} alt=""/>
)
}
<div className='shadow'></div>
</div>
<div className={`member__join ${item.nobody ? '' : 'join'}`}></div>
</li> </li>
}) })
) )
......
...@@ -15,20 +15,59 @@ ...@@ -15,20 +15,59 @@
.member__list { .member__list {
height: 50px; height: 50px;
width: 224px; width: 224px;
display: flex;
justify-content: flex-start;
align-items: center;
margin-right: 12px;
.member__item { .member__item {
width: 44px; width: 44px;
height: 50px;
display: flex; display: flex;
flex-direction: column; flex-direction: column;
justify-content: space-between; justify-content: space-between;
align-items: center; align-items: center;
margin-left: 1px;
.head__image { &:first-child {
border: 1px solid #FFF; margin-left: 0;
border-radius: 50%; .member__join{
border-radius: 2px 0 0 2px;
}
}
&:last-child {
.member__join{
border-radius: 0 2px 2px 0;
}
}
.avatar__container {
width: 27px; width: 27px;
height: 27px; height: 27px;
position: relative;
border: 1px solid #fff;
border-radius: 50%;
.head__image {
border-radius: 50%;
width: 100%;
height: 100%;
}
.shadow {
width: 24px;
height: 3px;
background: #1a3528;
border-radius: 50%;
position: absolute;
bottom: -6px;
}
}
.member__join {
width: 40px;
height: 5px;
background: rgba(0, 88, 51, 1);
box-shadow: 1px 1px 2px 0px rgba(3, 52, 91, 0.35);
}
.join {
background:rgba(255,221,29,1);
box-shadow:1px 2px 2px 0px rgba(253,253,253,0.46) inset, 1px 2px 2px 0px rgba(253,253,253,0.46) inset;
} }
} }
} }
...@@ -38,7 +77,7 @@ ...@@ -38,7 +77,7 @@
height: 100%; height: 100%;
display: flex; display: flex;
flex-direction: column; flex-direction: column;
justify-content: space-between; justify-content: flex-start;
align-items: center; align-items: center;
position: relative; position: relative;
img { img {
...@@ -46,11 +85,14 @@ ...@@ -46,11 +85,14 @@
height: 50px; height: 50px;
} }
.box__text { .box__text {
width: 100%; width: 1000px;
line-height: 12px; font-size: 100px;
font-size: 12px; transform: scale(0.1) ;
text-decoration: underline; text-decoration: underline;
color: rgba(255, 227, 0, 1); color: rgba(255, 227, 0, 1);
position: absolute;
bottom: -72px;
text-align: center;
} }
.position__arrow { .position__arrow {
width: 18px; width: 18px;
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment