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
a1b14605
Commit
a1b14605
authored
Dec 14, 2019
by
xuzhenghua
Browse files
Options
Browse Files
Download
Plain Diff
pull
parents
228c8d60
80b6082f
Hide whitespace changes
Inline
Side-by-side
Showing
5 changed files
with
39 additions
and
31 deletions
+39
-31
src/components/activity/newyear-2019/common/prizes/index.js
+1
-1
src/components/activity/newyear-2019/landing/landing.scss
+3
-3
src/components/activity/newyear-2019/preheat/YearCourse/index.js
+2
-2
src/components/activity/newyear-2019/preheat/index.js
+27
-19
src/components/activity/newyear-2019/preheat/nav.js
+6
-6
No files found.
src/components/activity/newyear-2019/common/prizes/index.js
View file @
a1b14605
...
@@ -52,7 +52,7 @@ class Prizes extends Component {
...
@@ -52,7 +52,7 @@ class Prizes extends Component {
Popup
({
Popup
({
title
:
'组队开宝箱活动规则'
,
title
:
'组队开宝箱活动规则'
,
className
:
'landing-treasure-rules'
,
className
:
'landing-treasure-rules'
,
content
:
this
.
state
.
rule
,
content
:
<
div
dangerouslySetInnerHTML
=
{{
__html
:
this
.
state
.
rule
}}
/>
,
closeIcon
:
this
.
closeIcon
closeIcon
:
this
.
closeIcon
})
})
}
}
...
...
src/components/activity/newyear-2019/landing/landing.scss
View file @
a1b14605
...
@@ -18,7 +18,7 @@
...
@@ -18,7 +18,7 @@
text-align
:
center
;
text-align
:
center
;
#to-square
{
#to-square
{
position
:
relative
;
position
:
fixed
;
width
:
100%
;
width
:
100%
;
height
:
30px
;
height
:
30px
;
background
:
#FF2121
;
background
:
#FF2121
;
...
@@ -26,7 +26,7 @@
...
@@ -26,7 +26,7 @@
font-size
:
14px
;
font-size
:
14px
;
line-height
:
30px
;
line-height
:
30px
;
text-align
:
center
;
text-align
:
center
;
z-index
:
10
;
z-index
:
21
;
}
}
.box-container
{
.box-container
{
...
@@ -35,7 +35,7 @@
...
@@ -35,7 +35,7 @@
.snow-deco
{
.snow-deco
{
position
:
absolute
;
position
:
absolute
;
top
:
0
;
top
:
30px
;
left
:
0
;
left
:
0
;
display
:
block
;
display
:
block
;
width
:
100%
;
width
:
100%
;
...
...
src/components/activity/newyear-2019/preheat/YearCourse/index.js
View file @
a1b14605
...
@@ -327,11 +327,11 @@ class YearCourse extends Component {
...
@@ -327,11 +327,11 @@ class YearCourse extends Component {
isFollow
=
(
id
,
key
)
=>
{
isFollow
=
(
id
,
key
)
=>
{
const
_this
=
this
const
_this
=
this
http
.
get
(
`
${
API
.
home
}
/
m/live/isFollow
`
).
then
(
res
=>
{
http
.
get
(
`
${
API
.
home
}
/
sys/user/isFollowWeChat
`
).
then
(
res
=>
{
const
{
code
,
data
,
msg
}
=
res
.
data
const
{
code
,
data
,
msg
}
=
res
.
data
if
(
code
===
200
)
{
if
(
code
===
200
)
{
_this
.
setState
({
_this
.
setState
({
isshowFollow
:
data
.
status
==
0
?
true
:
false
isshowFollow
:
!
data
.
is_follow
})
})
if
(
!
_this
.
state
.
isshowFollow
)
{
if
(
!
_this
.
state
.
isshowFollow
)
{
...
...
src/components/activity/newyear-2019/preheat/index.js
View file @
a1b14605
...
@@ -10,11 +10,14 @@ import {setCurrentUser, startFetchUser} from "@/store/userAction"
...
@@ -10,11 +10,14 @@ import {setCurrentUser, startFetchUser} from "@/store/userAction"
import
{
SendMessageToApp
,
getParam
,
http
}
from
'@/utils'
import
{
SendMessageToApp
,
getParam
,
http
}
from
'@/utils'
import
{
addDays
}
from
"date-fns"
import
{
addDays
}
from
"date-fns"
import
{
connect
}
from
"react-redux"
import
{
connect
}
from
"react-redux"
import
{
Toast
}
from
'antd-mobile'
;
import
{
Toast
}
from
'antd-mobile'
import
{
compose
}
from
"redux"
@
connect
(
state
=>
({
@
connect
(
state
=>
({
user
:
state
.
user
user
:
state
.
user
}))
}),
{
setCurrentUser
,
startFetchUser
}
)
export
default
class
index
extends
Component
{
export
default
class
index
extends
Component
{
state
=
{
state
=
{
...
@@ -35,8 +38,7 @@ export default class index extends Component {
...
@@ -35,8 +38,7 @@ export default class index extends Component {
window
[
'loginInfo'
]
=
result
=>
{
window
[
'loginInfo'
]
=
result
=>
{
_this
.
loginInfo
(
result
)
_this
.
loginInfo
(
result
)
}
}
_this
.
getStage
()
_this
.
getStage
();
}
}
// 获取app登录数据
// 获取app登录数据
...
@@ -126,16 +128,16 @@ export default class index extends Component {
...
@@ -126,16 +128,16 @@ export default class index extends Component {
// 获取活动以及宝箱的阶段
// 获取活动以及宝箱的阶段
getStage
=
()
=>
{
getStage
=
()
=>
{
http
.
get
(
`
${
API
.
home
}
/activity/stage`
).
then
(
res
=>
{
http
.
get
(
`
${
API
.
home
}
/activity/stage`
).
then
(
res
=>
{
const
{
code
,
data
,
msg
}
=
res
.
data
;
const
{
code
,
data
,
msg
}
=
res
.
data
if
(
code
===
200
)
{
if
(
code
===
200
)
{
// treasure_stage,宝箱阶段,0-不在活动时间,1-活动时间内
// treasure_stage,宝箱阶段,0-不在活动时间,1-活动时间内
this
.
setState
({
this
.
setState
({
treasure_stage
:
data
.
treasure_stage
treasure_stage
:
data
.
treasure_stage
})
})
}
else
{
}
else
{
Toast
.
info
(
msg
,
2
)
;
Toast
.
info
(
msg
,
2
)
}
}
})
;
})
}
}
toYearWish
=
()
=>
{
toYearWish
=
()
=>
{
...
@@ -152,9 +154,9 @@ export default class index extends Component {
...
@@ -152,9 +154,9 @@ export default class index extends Component {
}
}
sonToPar
(
e
){
sonToPar
(
e
)
{
this
.
setState
({
this
.
setState
({
txt1
:
e
txt1
:
e
})
})
}
}
...
@@ -174,11 +176,17 @@ export default class index extends Component {
...
@@ -174,11 +176,17 @@ export default class index extends Component {
<
div
className
=
'nav-right'
>
<
div
className
=
'nav-right'
>
<
span
onClick
=
{
this
.
toBoxList
}
className
=
'nav-right__link'
>
<
span
onClick
=
{
this
.
toBoxList
}
className
=
'nav-right__link'
>
未拆宝箱
未拆宝箱
<
i
className
=
"nav-right__number"
>
{
removable
}
<
/i
>
{
removable
>
0
&&
<
i
className
=
"nav-right__number"
>
{
removable
}
<
/i
>
}
<
/span
>
<
/span
>
<
a
onClick
=
{()
=>
this
.
toYearWish
()}
className
=
'nav-right__link'
>
<
a
onClick
=
{()
=>
this
.
toYearWish
()}
className
=
'nav-right__link'
>
心愿单
心愿单
<
i
className
=
"nav-right__number"
>
{
this
.
state
.
txt1
}
<
/i
>
{
this
.
state
.
txt1
>
0
&&
<
i
className
=
"nav-right__number"
>
{
this
.
state
.
txt1
}
<
/i
>
}
<
/a
>
<
/a
>
<
/div
>
<
/div
>
{
/* 大咖直播 */
}
{
/* 大咖直播 */
}
...
@@ -186,7 +194,7 @@ export default class index extends Component {
...
@@ -186,7 +194,7 @@ export default class index extends Component {
{
/* 组队开宝箱 */
}
{
/* 组队开宝箱 */
}
{
{
treasure_stage
===
1
&&
<
TreasureBox
getRemovable
=
{
this
.
getRemovable
}
/
>
treasure_stage
===
1
&&
<
TreasureBox
getRemovable
=
{
this
.
getRemovable
}
/
>
}
}
{
/*课程*/
}
{
/*课程*/
}
...
...
src/components/activity/newyear-2019/preheat/nav.js
View file @
a1b14605
...
@@ -25,15 +25,15 @@ class TreasureNav extends Component {
...
@@ -25,15 +25,15 @@ class TreasureNav extends Component {
},
},
{
{
id
:
'year-free'
,
id
:
'year-free'
,
name
:
'免费
专区
'
name
:
'免费
学
'
},
},
{
{
id
:
'year-group'
,
id
:
'year-group'
,
name
:
'
一
分拼团'
name
:
'
1
分拼团'
},
},
{
{
id
:
'year-discount'
,
id
:
'year-discount'
,
name
:
'
一折
专区'
name
:
'
抄低
专区'
},
},
]
]
};
};
...
@@ -108,9 +108,9 @@ class TreasureNav extends Component {
...
@@ -108,9 +108,9 @@ class TreasureNav extends Component {
<
div
className
=
{
classnames
(
"treasure-nav"
,
{
'fixed'
:
isFixed
})}
data
-
skip
=
"nav"
>
<
div
className
=
{
classnames
(
"treasure-nav"
,
{
'fixed'
:
isFixed
})}
data
-
skip
=
"nav"
>
{
{
formatNavs
.
map
((
item
,
index
)
=>
(
formatNavs
.
map
((
item
,
index
)
=>
(
<
a
<
a
href
=
{
`#
${
item
.
id
}
`
}
href
=
{
`#
${
item
.
id
}
`
}
className
=
{
classnames
(
"treasure-nav__item"
,
{
'active'
:
index
===
curIndex
})}
className
=
{
classnames
(
"treasure-nav__item"
,
{
'active'
:
index
===
curIndex
})}
key
=
{
item
.
id
}
key
=
{
item
.
id
}
onClick
=
{()
=>
this
.
selectToNav
(
index
)}
onClick
=
{()
=>
this
.
selectToNav
(
index
)}
>
{
item
.
name
}
<
/a
>
>
{
item
.
name
}
<
/a
>
...
...
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