Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
M
mr-julyedu
Overview
Overview
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
baiguangyao
mr-julyedu
Commits
aaa008be
Commit
aaa008be
authored
Dec 17, 2019
by
wangshuo
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
组队信息增加需求
parent
16d88d53
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
19 additions
and
2 deletions
+19
-2
src/components/activity/newyear-2019/treasure-box/team.js
+19
-2
No files found.
src/components/activity/newyear-2019/treasure-box/team.js
View file @
aaa008be
...
@@ -5,6 +5,7 @@ import { Toast } from 'antd-mobile';
...
@@ -5,6 +5,7 @@ import { Toast } from 'antd-mobile';
import
{
withRouter
}
from
'react-router-dom'
;
import
{
withRouter
}
from
'react-router-dom'
;
import
{
compose
}
from
"redux"
import
{
compose
}
from
"redux"
import
{
connect
}
from
"react-redux"
;
import
{
connect
}
from
"react-redux"
;
import
jsCookie
from
'js-cookie'
class
TeamInfo
extends
Component
{
class
TeamInfo
extends
Component
{
constructor
(
props
)
{
constructor
(
props
)
{
...
@@ -36,7 +37,7 @@ class TeamInfo extends Component {
...
@@ -36,7 +37,7 @@ class TeamInfo extends Component {
prize_info
,
prize_info
,
is_my_team
,
is_my_team
,
info
,
info
,
member
:
this
.
fillTeam
(
member
),
member
:
this
.
fillTeam
(
member
,
is_my_team
),
removable_data
,
removable_data
,
my_team
my_team
})
})
...
@@ -117,8 +118,22 @@ class TeamInfo extends Component {
...
@@ -117,8 +118,22 @@ class TeamInfo extends Component {
}
}
// 队伍成员信息必须满五个 不满的需要填充
// 队伍成员信息必须满五个 不满的需要填充
fillTeam
=
(
list
)
=>
{
fillTeam
=
(
list
,
is_my_team
)
=>
{
let
len
=
list
.
length
;
let
len
=
list
.
length
;
// 没有创建队伍 并且没有加入他人队伍
if
(
len
===
0
&&
!
is_my_team
)
{
list
.
push
({
head_img
:
jsCookie
.
get
(
'avatar_file'
),
user_name
:
jsCookie
.
get
(
'user_name'
),
})
for
(
let
i
=
0
;
i
<
4
;
i
++
)
{
list
.
push
({
head_img
:
''
,
user_name
:
''
,
nobody
:
true
,
})
}
}
else
{
for
(
let
i
=
0
;
i
<
5
-
len
;
i
++
)
{
for
(
let
i
=
0
;
i
<
5
-
len
;
i
++
)
{
list
.
push
({
list
.
push
({
head_img
:
''
,
head_img
:
''
,
...
@@ -126,6 +141,8 @@ class TeamInfo extends Component {
...
@@ -126,6 +141,8 @@ class TeamInfo extends Component {
nobody
:
true
,
nobody
:
true
,
})
})
}
}
}
return
list
;
return
list
;
}
}
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment