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
9917dc13
Commit
9917dc13
authored
Nov 07, 2019
by
zhanghaozhe
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
app登录
parent
b5156b58
Show whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
11 additions
and
7 deletions
+11
-7
src/components/blessingPreheat/formal-draw/index.js
+10
-6
src/components/blessingPreheat/index.js
+1
-1
No files found.
src/components/blessingPreheat/formal-draw/index.js
View file @
9917dc13
...
...
@@ -8,7 +8,10 @@ import classnames from 'classnames'
import
Swiper
from
'swiper'
import
{
Popup
}
from
"@common/index"
import
QRCode
from
'qrcode'
import
{
connect
}
from
'react-redux'
@
connect
(
state
=>
({
user
:
state
.
user
}))
class
FormalDraw
extends
Component
{
swiper
=
null
...
...
@@ -21,7 +24,6 @@ class FormalDraw extends Component {
tabs
:
[],
today
:
''
,
initialPageIndex
:
0
,
isLogin
:
false
,
list
:
[],
activeTimeRangeIndex
:
0
,
userValue
:
{},
...
...
@@ -34,12 +36,11 @@ class FormalDraw extends Component {
const
oneDay
=
data
.
list
.
filter
(
item
=>
item
.
date
===
data
.
value
.
today
)
const
activeIndex
=
oneDay
[
0
][
'son'
].
findIndex
(
item
=>
item
.
status
==
3
)
if
(
code
==
200
)
{
const
{
is_login
,
today
}
=
data
.
value
const
{
today
}
=
data
.
value
this
.
setState
({
tabs
:
data
.
list
.
map
(
item
=>
({
title
:
item
.
date
})),
today
,
initialPageIndex
:
data
.
list
.
findIndex
(
item
=>
item
.
date
==
today
)
||
0
,
isLogin
:
is_login
,
list
:
data
.
list
,
userValue
:
data
.
value
,
activeTimeRangeIndex
:
activeIndex
<
0
?
0
:
activeIndex
...
...
@@ -117,8 +118,9 @@ class FormalDraw extends Component {
}
lotteryFunc
=
(
status
,
id
)
=>
{
if
(
!
this
.
state
.
isLogin
)
{
this
.
props
.
history
.
push
(
'/passport'
)
const
{
hasError
}
=
this
.
props
.
user
if
(
hasError
)
{
this
.
props
.
toLogin
()
return
}
if
(
status
==
3
)
{
...
...
@@ -156,7 +158,9 @@ class FormalDraw extends Component {
}
render
()
{
const
{
tabs
,
today
,
initialPageIndex
,
isLogin
,
list
,
activeTimeRangeIndex
,
userValue
}
=
this
.
state
const
{
tabs
,
today
,
initialPageIndex
,
list
,
activeTimeRangeIndex
,
userValue
}
=
this
.
state
const
{
hasError
}
=
this
.
props
.
user
const
isLogin
=
!
hasError
const
schedule
=
userValue
.
schedule
<=
2
?
2
:
userValue
.
schedule
return
(
list
.
length
>
0
?
...
...
src/components/blessingPreheat/index.js
View file @
9917dc13
...
...
@@ -578,7 +578,7 @@ class BlessingPreheat extends Component {
<
button
className
=
"luck-draw__button"
onClick
=
{()
=>
this
.
handleToShow
(
'isRule'
)}
>
活动规则
><
/button
>
<
button
className
=
'prize-record'
onClick
=
{
this
.
getMyPrizeRecord
}
>
中奖记录
><
/button
>
<
/div
>
<
FormalDraw
/>
<
FormalDraw
toLogin
=
{
this
.
toLogin
}
/
>
<
/
>
}
...
...
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