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
283015f2
Commit
283015f2
authored
Dec 17, 2019
by
FE
Browse files
Options
Browse Files
Download
Plain Diff
Merge branch '00' into pre
parents
bec3cef4
f60103b5
Show whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
29 additions
and
13 deletions
+29
-13
src/components/activity/newyear-2019/landing/index.js
+10
-4
src/components/activity/newyear-2019/myTreasure/index.js
+19
-9
No files found.
src/components/activity/newyear-2019/landing/index.js
View file @
283015f2
...
@@ -116,6 +116,15 @@ class Landing extends Component {
...
@@ -116,6 +116,15 @@ class Landing extends Component {
})
})
}
}
handleToMyTreasure
=
()
=>
{
this
.
joinSuccessPopup
&&
this
.
joinSuccessPopup
.
remove
()
if
(
getParam
(
'version'
))
{
history
.
push
(
`/year/yearTreasure?id=
${
id
}
&version=
${
getParam
(
'version'
)}
`
)
}
else
{
history
.
push
(
`/year/yearTreasure?id=
${
id
}
`
)
}
}
joinSuccess
=
({
id
,
status
,
my_team
:
{
team_num
,
lack_member
,
is_team
,
treasure_code
}})
=>
{
joinSuccess
=
({
id
,
status
,
my_team
:
{
team_num
,
lack_member
,
is_team
,
treasure_code
}})
=>
{
const
{
history
}
=
this
.
props
const
{
history
}
=
this
.
props
this
.
joinSuccessPopup
=
Popup
({
this
.
joinSuccessPopup
=
Popup
({
...
@@ -139,10 +148,7 @@ class Landing extends Component {
...
@@ -139,10 +148,7 @@ class Landing extends Component {
?
<
img
style
=
{{
width
:
'150px'
,
marginTop
:
'23px'
}}
?
<
img
style
=
{{
width
:
'150px'
,
marginTop
:
'23px'
}}
src
=
"https://julyedu-cdn.oss-cn-beijing.aliyuncs.com/newyear20/PC/treasure-box.png"
src
=
"https://julyedu-cdn.oss-cn-beijing.aliyuncs.com/newyear20/PC/treasure-box.png"
alt
=
""
alt
=
""
onClick
=
{()
=>
{
onClick
=
{
this
.
handleToMyTreasure
}
this
.
joinSuccessPopup
&&
this
.
joinSuccessPopup
.
remove
()
history
.
push
(
`/year/yearTreasure?id=
${
id
}
`
)
}}
/
>
/
>
:
is_team
:
is_team
?
<
button
type
=
'button'
?
<
button
type
=
'button'
...
...
src/components/activity/newyear-2019/myTreasure/index.js
View file @
283015f2
...
@@ -40,17 +40,16 @@ class MyTreasure extends Component {
...
@@ -40,17 +40,16 @@ class MyTreasure extends Component {
}
}
componentDidMount
()
{
componentDidMount
()
{
const
{
isEnd
}
=
this
.
state
;
const
{
userInfo
,
history
}
=
this
.
props
;
if
(
!
userInfo
.
uid
)
{
history
.
push
(
'/passport'
);
}
if
(
isEnd
)
{
this
.
startCountDown
();
}
this
.
fetchMyTreasure
();
this
.
fetchMyTreasure
();
this
.
fetchActivityStatus
();
this
.
fetchActivityStatus
();
}
componentWillReceiveProps
(
nextProp
)
{
const
{
history
}
=
this
.
props
;
const
{
userInfo
}
=
nextProp
;
if
(
!
userInfo
.
uid
)
{
history
.
push
(
'/passport'
);
}
}
}
// 页面加载时,初始化当前需要绑定手机号的奖品名字
// 页面加载时,初始化当前需要绑定手机号的奖品名字
...
@@ -292,8 +291,10 @@ class MyTreasure extends Component {
...
@@ -292,8 +291,10 @@ class MyTreasure extends Component {
http
.
get
(
`
${
API
.
home
}
/activity/stage`
).
then
(
res
=>
{
http
.
get
(
`
${
API
.
home
}
/activity/stage`
).
then
(
res
=>
{
const
{
code
,
data
}
=
res
.
data
;
const
{
code
,
data
}
=
res
.
data
;
if
(
code
===
200
)
{
if
(
code
===
200
)
{
// treasure_stage,宝箱阶段,0-不在活动时间,1-活动时间内
// treasure_stage,宝箱阶段,0-不在活动时间,1-活动时间内
if
(
data
.
treasure_stage
===
0
)
{
this
.
startCountDown
();
}
this
.
setState
({
this
.
setState
({
isEnd
:
data
.
treasure_stage
===
0
isEnd
:
data
.
treasure_stage
===
0
});
});
...
@@ -328,8 +329,12 @@ class MyTreasure extends Component {
...
@@ -328,8 +329,12 @@ class MyTreasure extends Component {
// 邀请好友
// 邀请好友
handleToInvite
=
(
treasure_code
)
=>
{
handleToInvite
=
(
treasure_code
)
=>
{
const
{
history
}
=
this
.
props
;
const
{
history
}
=
this
.
props
;
if
(
getParam
(
'version'
)){
history
.
push
(
`/activity/newyear-2019/landing?treasure_code=
${
treasure_code
}
&origin=1&version=
${
getParam
(
'version'
)}
`
);
}
else
{
history
.
push
(
`/activity/newyear-2019/landing?treasure_code=
${
treasure_code
}
&origin=1`
);
history
.
push
(
`/activity/newyear-2019/landing?treasure_code=
${
treasure_code
}
&origin=1`
);
}
}
}
// 组队开宝箱
// 组队开宝箱
toOrganizeTeam
=
()
=>
{
toOrganizeTeam
=
()
=>
{
...
@@ -549,12 +554,17 @@ class MyTreasure extends Component {
...
@@ -549,12 +554,17 @@ class MyTreasure extends Component {
<
/Mask
>
<
/Mask
>
<
/div
>
<
/div
>
}
}
{
rule
&&
<>
<
div
className
=
"activity-rule__header"
>
<
div
className
=
"activity-rule__header"
>
<
i
className
=
"activity-rule__decorate"
><
/i
>
<
i
className
=
"activity-rule__decorate"
><
/i
>
<
h2
className
=
"activity-rule__title"
>
活动规则
<
/h2
>
<
h2
className
=
"activity-rule__title"
>
活动规则
<
/h2
>
<
i
className
=
"activity-rule__decorate"
><
/i
>
<
i
className
=
"activity-rule__decorate"
><
/i
>
<
/div
>
<
/div
>
<
div
className
=
"activity-rule__body"
dangerouslySetInnerHTML
=
{{
__html
:
rule
}}
><
/div
>
<
div
className
=
"activity-rule__body"
dangerouslySetInnerHTML
=
{{
__html
:
rule
}}
><
/div
>
<
/
>
}
<
/div
>
<
/div
>
)
)
}
}
...
...
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