Commit 18a5f283 by wangshuo

11

parent 85f93209
......@@ -26,6 +26,7 @@ class TeamInfo extends Component {
this.getTeamInfo();
}
// 获取队伍信息
getTeamInfo = () => {
http.get(`${API.home}/sys/treasure/teamInfo`).then(res => {
const { code, data, msg } = res.data;
......@@ -35,7 +36,7 @@ class TeamInfo extends Component {
prize_info,
is_my_team,
info,
member: this.format(member),
member: this.fillTeam(member),
removable_data
})
} else {
......@@ -55,7 +56,14 @@ class TeamInfo extends Component {
this.props.history.push(`/year/yearTreasure${search}`);
}
format = (list) => {
// 邀请好友组队
createTeam = () => {
// TODO 跳转到邀请落地页
this.props.history.push('/activity/newyear-2019/landing')
}
// 队伍成员信息必须满五个 不满的需要填充
fillTeam = (list) => {
let len = list.length;
for(let i=0;i<5-len;i++) {
list.push({
......@@ -122,7 +130,7 @@ class TeamInfo extends Component {
}
</div>
</div>
<div className='invite__btn'>
<div onClick={this.createTeam} className='invite__btn'>
{
is_my_team ? ('继续组队') : ('组队开宝箱')
}
......
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