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
17f16952
Commit
17f16952
authored
Dec 10, 2019
by
wangshuo
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
teaminfo接口修改
parent
18a5f283
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
34 additions
and
15 deletions
+34
-15
src/components/activity/newyear-2019/treasure-box/team.js
+34
-15
No files found.
src/components/activity/newyear-2019/treasure-box/team.js
View file @
17f16952
...
...
@@ -3,16 +3,15 @@ import './team.scss'
import
{
getParam
,
http
,
SendMessageToApp
,
browser
}
from
"@/utils"
import
{
Toast
}
from
'antd-mobile'
;
import
{
withRouter
}
from
'react-router-dom'
;
import
{
compose
}
from
"redux"
import
{
connect
}
from
"react-redux"
;
class
TeamInfo
extends
Component
{
constructor
(
props
)
{
super
(
props
);
this
.
state
=
{
is_my_team
:
true
,
// 是否有自己的队伍
prize_info
:
{
name
:
''
,
stage_no
:
0
,
},
prize_info
:
[],
info
:
{
removable
:
0
,
total
:
0
...
...
@@ -47,19 +46,28 @@ class TeamInfo extends Component {
// 跳转到我的宝箱页
toYearTreasure
=
(
close
)
=>
{
let
search
=
''
;
if
(
close
)
{
const
{
removable_data
}
=
this
.
state
;
let
current
=
removable_data
[
0
];
search
=
`?team_num=
${
current
.
team_num
}
&owner_uid=
${
current
.
captain_uid
}
`
;
if
(
this
.
props
.
user
.
hasError
)
{
this
.
props
.
history
.
push
(
'/passport/login'
);
}
else
{
let
search
=
''
;
if
(
close
)
{
const
{
removable_data
}
=
this
.
state
;
let
current
=
removable_data
[
0
];
search
=
`?team_num=
${
current
.
team_num
}
&owner_uid=
${
current
.
captain_uid
}
`
;
}
this
.
props
.
history
.
push
(
`/year/yearTreasure
${
search
}
`
);
}
this
.
props
.
history
.
push
(
`/year/yearTreasure
${
search
}
`
);
}
// 邀请好友组队
createTeam
=
()
=>
{
// TODO 跳转到邀请落地页
this
.
props
.
history
.
push
(
'/activity/newyear-2019/landing'
)
if
(
this
.
props
.
user
.
hasError
)
{
this
.
props
.
history
.
push
(
'/passport/login'
);
}
else
{
// TODO 跳转到邀请落地页需要什么参数
this
.
props
.
history
.
push
(
'/activity/newyear-2019/landing'
)
}
}
// 队伍成员信息必须满五个 不满的需要填充
...
...
@@ -76,7 +84,12 @@ class TeamInfo extends Component {
}
render
()
{
const
{
prize_info
:
{
name
,
stage_no
},
is_my_team
,
info
:
{
removable
,
total
},
member
}
=
this
.
state
;
const
{
prize_info
,
is_my_team
,
info
:
{
removable
,
total
},
member
}
=
this
.
state
;
let
name
=
''
,
stage_no
=
0
;
if
(
prize_info
.
length
>
0
)
{
name
=
prize_info
[
0
].
name
;
stage_no
=
prize_info
[
0
].
stage_no
;
}
// 显示文案控制
let
Text
=
''
;
if
(
total
===
0
)
{
...
...
@@ -136,10 +149,16 @@ class TeamInfo extends Component {
}
<
/div
>
{
stage_no
&&
name
&&
<
p
className
=
'stage_prize'
>
{
`第
${
stage_no
}
次必中
${
name
}
`
}
<
/p
>
stage_no
>
0
&&
name
&&
<
p
className
=
'stage_prize'
>
{
`第
${
stage_no
}
次必中
${
name
}
`
}
<
/p
>
}
<
/div
>
)
}
}
export
default
withRouter
(
TeamInfo
)
export
default
compose
(
connect
(
state
=>
({
user
:
state
.
user
}),
null
),
withRouter
)(
TeamInfo
)
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