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
a0811f80
Commit
a0811f80
authored
Dec 12, 2019
by
wangshuo
Browse files
Options
Browse Files
Download
Plain Diff
Merge branch '00' into dev
parents
b9fdebeb
2cd9cdc0
Show whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
43 additions
and
7 deletions
+43
-7
src/components/activity/newyear-2019/preheat/index.js
+33
-5
src/components/activity/newyear-2019/preheat/nav.js
+1
-1
src/components/activity/newyear-2019/treasure-box/index.js
+4
-1
src/components/activity/newyear-2019/treasure-box/team.js
+5
-0
No files found.
src/components/activity/newyear-2019/preheat/index.js
View file @
a0811f80
...
...
@@ -17,6 +17,8 @@ import {connect} from "react-redux"
export
default
class
index
extends
Component
{
state
=
{
removable
:
0
,
// 未拆宝箱的数量
currentOpenId
:
0
,
// 当前要拆的宝箱的队伍的ID
userInfoList
:
[],
userInfo
:
{},
isAppUpdate
:
false
,
...
...
@@ -90,6 +92,32 @@ export default class index extends Component {
})
}
// 获取未拆宝箱数量
getRemovable
=
(
removable
,
currentOpenId
)
=>
{
this
.
setState
({
removable
,
currentOpenId
,
})
}
// 跳转到我的宝箱列表页
toBoxList
=
()
=>
{
const
isLogin
=
!
this
.
props
.
user
.
hasError
const
{
currentOpenId
}
=
this
.
state
;
let
search
=
''
;
if
(
currentOpenId
)
{
search
=
`?id=
${
currentOpenId
}
`
;
}
if
(
isLogin
)
{
this
.
props
.
history
.
push
(
`/year/yearTreasure
${
search
}
`
)
}
else
{
if
(
!
getParam
(
'version'
))
{
this
.
props
.
history
.
push
(
'/passport/login'
)
}
else
{
SendMessageToApp
(
"toLogin"
)
}
}
}
toYearWish
=
()
=>
{
const
isLogin
=
!
this
.
props
.
user
.
hasError
if
(
isLogin
)
{
...
...
@@ -111,7 +139,7 @@ export default class index extends Component {
}
render
()
{
const
{
banner
}
=
this
.
state
const
{
banner
,
removable
}
=
this
.
state
return
(
<
div
className
=
{
'year-index'
}
>
<
div
className
=
"banner-treasure"
>
...
...
@@ -124,10 +152,10 @@ export default class index extends Component {
<
/div
>
{
/*浮框*/
}
<
div
className
=
'nav-right'
>
<
a
href
=
""
className
=
'nav-right__link'
>
<
span
onClick
=
{
this
.
toBoxList
}
className
=
'nav-right__link'
>
未拆宝箱
<
i
className
=
"nav-right__number"
>
2
<
/i
>
<
/
a
>
<
i
className
=
"nav-right__number"
>
{
removable
}
<
/i
>
<
/
span
>
<
a
onClick
=
{()
=>
this
.
toYearWish
()}
className
=
'nav-right__link'
>
心愿单
<
i
className
=
"nav-right__number"
>
{
this
.
state
.
txt1
}
<
/i
>
...
...
@@ -137,7 +165,7 @@ export default class index extends Component {
<
LiveRoom
/>
{
/* 组队开宝箱 */
}
<
TreasureBox
/>
<
TreasureBox
getRemovable
=
{
this
.
getRemovable
}
/
>
{
/*课程*/
}
<
YearCourse
isAppUpdate
=
{
this
.
state
.
isAppUpdate
}
getSum
=
{
this
.
sonToPar
.
bind
(
this
)}
/
>
...
...
src/components/activity/newyear-2019/preheat/nav.js
View file @
a0811f80
...
...
@@ -29,7 +29,7 @@ class TreasureNav extends Component {
},
{
id
:
'year-group'
,
name
:
'一
元
拼团'
name
:
'一
分
拼团'
},
{
id
:
'year-discount'
,
...
...
src/components/activity/newyear-2019/treasure-box/index.js
View file @
a0811f80
...
...
@@ -6,13 +6,16 @@ import Prizes from "@components/activity/newyear-2019/common/prizes"
import
UserBulletScreen
from
"@components/activity/newyear-2019/common/user-bullet-screen"
class
TreasureBox
extends
Component
{
constructor
(
props
)
{
super
(
props
);
}
render
()
{
return
(
<
CommonContainer
id
=
"year-treasure"
title
=
{
'组队开宝箱'
}
>
<
div
style
=
{{
textAlign
:
'center'
,
fontSize
:
'12px'
,
color
:
'#FFDC1E'
,
marginTop
:
'10px'
}}
>
邀请好友组队一起开宝箱,满
5
人后将随机获得以下奖品
~<
/div
>
<
Prizes
showSystemNotices
=
{
true
}
/
>
<
UserBulletScreen
/>
<
TeamInfo
/>
<
TeamInfo
getRemovable
=
{
this
.
props
.
getRemovable
}
/
>
<
TreasureRank
/>
<
/CommonContainer
>
)
...
...
src/components/activity/newyear-2019/treasure-box/team.js
View file @
a0811f80
...
...
@@ -40,6 +40,11 @@ class TeamInfo extends Component {
removable_data
,
my_team
})
let
currentId
=
null
;
if
(
info
.
removable
>
0
)
{
currentId
=
removable_data
[
0
].
id
;
}
this
.
props
.
getRemovable
(
info
.
removable
,
currentId
);
}
else
{
Toast
.
info
(
msg
);
}
...
...
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