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
d4404183
Commit
d4404183
authored
Nov 13, 2019
by
wangshuo
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
返场
parent
f41f4c8f
Show whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
25 additions
and
10 deletions
+25
-10
src/components/blessingPreheat/formal-draw/index.js
+5
-1
src/components/blessingPreheat/index.js
+10
-9
src/components/blessingPreheat/index.scss
+10
-0
No files found.
src/components/blessingPreheat/formal-draw/index.js
View file @
d4404183
...
@@ -48,7 +48,11 @@ class FormalDraw extends Component {
...
@@ -48,7 +48,11 @@ class FormalDraw extends Component {
if
(
code
==
200
)
{
if
(
code
==
200
)
{
const
{
today
}
=
data
.
value
const
{
today
}
=
data
.
value
const
oneDay
=
data
.
list
.
filter
(
item
=>
item
.
date
===
data
.
value
.
today
)
const
oneDay
=
data
.
list
.
filter
(
item
=>
item
.
date
===
data
.
value
.
today
)
const
activeIndex
=
oneDay
[
0
][
'son'
].
findIndex
(
item
=>
item
.
status
==
3
)
let
activeIndex
=
0
;
if
(
oneDay
.
length
>
0
)
{
activeIndex
=
oneDay
[
0
][
'son'
].
findIndex
(
item
=>
item
.
status
==
3
)
}
this
.
setState
({
this
.
setState
({
tabs
:
data
.
list
.
map
(
item
=>
({
title
:
item
.
date
})),
tabs
:
data
.
list
.
map
(
item
=>
({
title
:
item
.
date
})),
today
,
today
,
...
...
src/components/blessingPreheat/index.js
View file @
d4404183
...
@@ -144,10 +144,10 @@ class BlessingPreheat extends Component {
...
@@ -144,10 +144,10 @@ class BlessingPreheat extends Component {
componentDidMount
()
{
componentDidMount
()
{
const
_this
=
this
;
const
_this
=
this
;
this
.
fetchUserBlessing
()
this
.
fetchUserBlessing
()
setTimeout
(
function
(){
//
setTimeout(function(){
// 这里有获取ID的步骤,由于运营过多的调整,导致顺序不定,所以包含ID的title必须要放到判断中(防止出现多个title),设置定时器是因为如果返回较慢 获取不到ID导致报错
//
// 这里有获取ID的步骤,由于运营过多的调整,导致顺序不定,所以包含ID的title必须要放到判断中(防止出现多个title),设置定时器是因为如果返回较慢 获取不到ID导致报错
_this
.
setInitialNavActiveStatus
()
//
_this.setInitialNavActiveStatus()
},
0
);
// }, 5
0);
window
.
addEventListener
(
'scroll'
,
throttle
(
this
.
calcNavActive
,
100
))
window
.
addEventListener
(
'scroll'
,
throttle
(
this
.
calcNavActive
,
100
))
if
(
is_weixin
())
{
if
(
is_weixin
())
{
wxShare
({
wxShare
({
...
@@ -313,7 +313,7 @@ class BlessingPreheat extends Component {
...
@@ -313,7 +313,7 @@ class BlessingPreheat extends Component {
SendMessageToApp
(
"toQualityCourse"
);
SendMessageToApp
(
"toQualityCourse"
);
}
}
}
}
this
.
setState
({
this
.
setState
(
()
=>
(
{
isSign
:
!!
data
.
today_signed
,
isSign
:
!!
data
.
today_signed
,
isFormal
:
data
.
is_activity
,
isFormal
:
data
.
is_activity
,
onlyShow
:
data
.
onlyShow
,
onlyShow
:
data
.
onlyShow
,
...
@@ -324,7 +324,8 @@ class BlessingPreheat extends Component {
...
@@ -324,7 +324,8 @@ class BlessingPreheat extends Component {
buyBlessing
:
(
data
.
types_total_blessing_value
&&
data
.
types_total_blessing_value
.
buy_course
)
?
data
.
types_total_blessing_value
.
buy_course
:
0
,
buyBlessing
:
(
data
.
types_total_blessing_value
&&
data
.
types_total_blessing_value
.
buy_course
)
?
data
.
types_total_blessing_value
.
buy_course
:
0
,
inviteBlessing
:
(
data
.
types_total_blessing_value
&&
data
.
types_total_blessing_value
.
invite
)
?
data
.
types_total_blessing_value
.
invite
:
0
,
inviteBlessing
:
(
data
.
types_total_blessing_value
&&
data
.
types_total_blessing_value
.
invite
)
?
data
.
types_total_blessing_value
.
invite
:
0
,
})
})
})
}));
this
.
setInitialNavActiveStatus
()
if
(
data
.
is_login
===
1
)
{
if
(
data
.
is_login
===
1
)
{
this
.
handleToSign
()
this
.
handleToSign
()
}
}
...
@@ -648,7 +649,7 @@ class BlessingPreheat extends Component {
...
@@ -648,7 +649,7 @@ class BlessingPreheat extends Component {
<
ListHeader
id
=
{
'lucky-draw'
}
text
=
"幸运大抽奖"
styles
=
{{
margin
:
onlyShow
?
'30px 0 10px'
:
'60px 0 10px'
}}
/
>
<
ListHeader
id
=
{
'lucky-draw'
}
text
=
"幸运大抽奖"
styles
=
{{
margin
:
onlyShow
?
'30px 0 10px'
:
'60px 0 10px'
}}
/
>
{
{
onlyShow
?
(
onlyShow
?
(
<
p
>
活动已结束
<
/p
>
<
p
className
=
'active_over'
>
活动已结束
<
/p
>
)
:
null
)
:
null
}
}
<
div
className
=
"formal-draw-btns"
>
<
div
className
=
"formal-draw-btns"
>
...
@@ -664,7 +665,7 @@ class BlessingPreheat extends Component {
...
@@ -664,7 +665,7 @@ class BlessingPreheat extends Component {
<
ListHeader
id
=
{
'lucky-value'
}
text
=
"积福气,享受更多福利"
styles
=
{{
margin
:
'30px 0 15px'
}}
/
>
<
ListHeader
id
=
{
'lucky-value'
}
text
=
"积福气,享受更多福利"
styles
=
{{
margin
:
'30px 0 15px'
}}
/
>
{
{
onlyShow
?
(
onlyShow
?
(
<
p
>
活动已结束
<
/p
>
<
p
className
=
'active_over'
>
活动已结束
<
/p
>
)
:
null
)
:
null
}
}
<
Link
className
=
"blessing__sort"
to
=
"/blessingRank"
><
/Link
>
<
Link
className
=
"blessing__sort"
to
=
"/blessingRank"
><
/Link
>
...
@@ -742,7 +743,7 @@ class BlessingPreheat extends Component {
...
@@ -742,7 +743,7 @@ class BlessingPreheat extends Component {
<
ListHeader
id
=
{
'ai-test'
}
text
=
"全国AI工程师水平测试"
styles
=
{{
margin
:
'30px 0 15px'
}}
/
>
<
ListHeader
id
=
{
'ai-test'
}
text
=
"全国AI工程师水平测试"
styles
=
{{
margin
:
'30px 0 15px'
}}
/
>
{
{
onlyShow
?
(
onlyShow
?
(
<
p
>
活动已结束
<
/p
>
<
p
className
=
'active_over'
>
活动已结束
<
/p
>
)
:
null
)
:
null
}
}
<
div
className
=
"test__record"
onClick
=
{()
=>
this
.
handleToShow
(
'showRecordList'
,
true
)}
>
<
div
className
=
"test__record"
onClick
=
{()
=>
this
.
handleToShow
(
'showRecordList'
,
true
)}
>
...
...
src/components/blessingPreheat/index.scss
View file @
d4404183
#blessing-preheat
{
#blessing-preheat
{
background
:
#5327FA
;
background
:
#5327FA
;
padding-bottom
:
30px
;
padding-bottom
:
30px
;
.active_over
{
font-size
:
20px
;
color
:
#fff604
;
width
:
100%
;
display
:
flex
;
justify-content
:
center
;
align-items
:
center
;
margin-bottom
:
10px
;
}
}
}
.test__record
{
.test__record
{
...
...
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