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
8e30482d
Commit
8e30482d
authored
Jul 10, 2020
by
zhanghaozhe
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
周年庆
parent
ac4d21a6
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
17 additions
and
4 deletions
+17
-4
src/components/activity/2020-717/activity/index.js
+17
-4
No files found.
src/components/activity/2020-717/activity/index.js
View file @
8e30482d
...
@@ -420,6 +420,9 @@ class Anniversary2020 extends Component {
...
@@ -420,6 +420,9 @@ class Anniversary2020 extends Component {
}
}
draw
=
debounce
((
i
)
=>
{
draw
=
debounce
((
i
)
=>
{
if
(
this
.
isGotoLogin
()){
return
}
const
{
activityData
,
prizeData
,
isDrawing
}
=
this
.
state
const
{
activityData
,
prizeData
,
isDrawing
}
=
this
.
state
if
(
i
!==
4
||
isDrawing
||
prizeData
.
odd_times
===
0
||
activityData
.
stage
===
4
)
{
if
(
i
!==
4
||
isDrawing
||
prizeData
.
odd_times
===
0
||
activityData
.
stage
===
4
)
{
return
return
...
@@ -484,7 +487,7 @@ class Anniversary2020 extends Component {
...
@@ -484,7 +487,7 @@ class Anniversary2020 extends Component {
this
.
setState
((
state
,
props
)
=>
{
this
.
setState
((
state
,
props
)
=>
{
return
{
return
{
prizeData
:
{...
state
.
prizeData
,
...{
odd_times
:
state
.
prizeData
.
odd_times
+
1
}},
prizeData
:
{...
state
.
prizeData
,
...{
odd_times
:
state
.
prizeData
.
odd_times
+
1
}},
activityData
:
{...
state
.
activity
_stage
,
...{
is_sign
:
true
}},
activityData
:
{...
state
.
activity
Data
,
...{
is_sign
:
true
}},
}
}
});
});
}
else
{
}
else
{
...
@@ -686,7 +689,7 @@ class Anniversary2020 extends Component {
...
@@ -686,7 +689,7 @@ class Anniversary2020 extends Component {
prizeData
.
prizes
&&
!!
prizeData
.
prizes
.
length
&&
prizeData
.
prizes
.
map
((
item
,
index
)
=>
{
prizeData
.
prizes
&&
!!
prizeData
.
prizes
.
length
&&
prizeData
.
prizes
.
map
((
item
,
index
)
=>
{
return
<
li
key
=
{
index
}
return
<
li
key
=
{
index
}
className
=
{
classnames
([
className
=
{
classnames
([
index
===
4
?
(
prizeData
.
odd_times
?
'available'
:
'unavailable'
)
:
''
,
index
===
4
?
(
user
.
hasError
||
prizeData
.
odd_times
?
'available'
:
'unavailable'
)
:
''
,
{
{
active
:
drawingItemId
===
item
.
id
,
active
:
drawingItemId
===
item
.
id
,
},
},
...
@@ -696,8 +699,18 @@ class Anniversary2020 extends Component {
...
@@ -696,8 +699,18 @@ class Anniversary2020 extends Component {
?
<
div
className
=
{
'prize'
}
>
?
<
div
className
=
{
'prize'
}
>
<
img
src
=
{
item
.
img_name
}
alt
=
""
/>
<
img
src
=
{
item
.
img_name
}
alt
=
""
/>
<
/div
>
<
/div
>
:
activityData
.
stage
===
1
?
:
activityData
.
stage
===
1
<
div
className
=
{
'draw'
}
style
=
{{
lineHeight
:
'350%'
}}
>
7
月
15
日开始
<
/div> : <div className={'draw'}
>
?
<
div
className
=
{
'draw'
}
style
=
{{
lineHeight
:
'350%'
}}
>
7
月
15
日开始
<
/div
>
:
user
.
hasError
?
<
div
className
=
"draw"
style
=
{{
height
:
'100%'
,
display
:
'flex'
,
alignItems
:
'center'
,
justifyContent
:
'center'
,
}}
>
<
div
>
抽奖
<
/div
>
<
/div
>
:
<
div
className
=
{
'draw'
}
>
<
div
>
抽奖
<
/div
>
<
div
>
抽奖
<
/div
>
<
div
>
剩余
{
prizeData
.
odd_times
||
0
}
次机会
<
/div
>
<
div
>
剩余
{
prizeData
.
odd_times
||
0
}
次机会
<
/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