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
d7ae3181
Commit
d7ae3181
authored
Jan 10, 2020
by
zhanghaozhe
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
领取页
parent
b7a878ef
Show whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
21 additions
and
10 deletions
+21
-10
src/components/activity/give-courses/assistance/assistance.scss
+0
-3
src/components/activity/give-courses/assistance/index.js
+19
-7
src/components/activity/give-courses/index.js
+2
-0
No files found.
src/components/activity/give-courses/assistance/assistance.scss
View file @
d7ae3181
...
...
@@ -53,7 +53,6 @@
.barrage-list
{
height
:
px2rem
(
30
);
overflow
:
hidden
;
li
{
height
:
px2rem
(
30
);
...
...
@@ -205,7 +204,6 @@
.person-left
{
display
:
flex
;
align-items
:
center
;
width
:
px2rem
(
200
);
overflow
:
hidden
;
.avatar
{
...
...
@@ -225,7 +223,6 @@
}
.person-right
{
margin-right
:
58px
;
.time
{
@include
px2px
(
font-size
,
22
);
...
...
src/components/activity/give-courses/assistance/index.js
View file @
d7ae3181
...
...
@@ -19,6 +19,7 @@ class GiveCourseAssistance extends Component {
scrollContainer
=
null
cloned
=
false
animationId
=
0
swiper
=
null
state
=
{
allCourse
:
[],
...
...
@@ -57,6 +58,7 @@ class GiveCourseAssistance extends Component {
componentWillUnmount
()
{
window
.
cancelAnimationFrame
(
this
.
animationId
)
this
.
swiper
&&
this
.
swiper
.
destroy
()
}
...
...
@@ -95,7 +97,8 @@ class GiveCourseAssistance extends Component {
})
}
inviteFriends
=
()
=>
{
getCourse
=
()
=>
{
_czc
&&
_czc
.
push
([
"_trackEvent"
,
'中间页免费领取课程'
,
'中间页免费领取课程'
])
const
{
history
,
user
}
=
this
.
props
if
(
browser
.
isWeixin
)
{
if
(
user
.
hasError
)
{
...
...
@@ -126,7 +129,8 @@ class GiveCourseAssistance extends Component {
}
toGetDetail
=
courseId
=>
{
_czc
&&
_czc
.
push
([
"_trackEvent"
,
`课程id=
${
courseId
}
`
,
'中间页查看课程详情'
])
window
.
location
.
href
=
this
.
state
.
activeUrl
}
displayScrollArea
=
()
=>
{
...
...
@@ -169,12 +173,13 @@ class GiveCourseAssistance extends Component {
}
setupHeadItemsSwiper
=
()
=>
{
new
Swiper
(
'.barrage-wrapper'
,
{
this
.
swiper
=
new
Swiper
(
'.barrage-wrapper'
,
{
autoplay
:
{
reverseDirection
:
true
delay
:
5000
},
direction
:
'vertical'
,
loop
:
true
loop
:
true
,
allowTouchMove
:
false
})
}
...
...
@@ -223,6 +228,7 @@ class GiveCourseAssistance extends Component {
<
div
className
=
"bg-image"
style
=
{{
backgroundImage
:
`url(
${
courseImg
}
)`
}}
>
{
isAwards
==
1
&&
<
button
className
=
"ranklist-btn"
type
=
"button"
onClick
=
{()
=>
{
_czc
&&
_czc
.
push
([
"_trackEvent"
,
'中间页大奖排行榜'
,
'中间页面大奖排行榜'
])
history
.
push
(
`/active/givecourse?activename=
${
activeName
}
`
)
}}
>
大奖排行榜
>><
/button
>
}
...
...
@@ -241,11 +247,16 @@ class GiveCourseAssistance extends Component {
{
getBtnStatus
===
1
?
<
button
type
=
"button"
className
=
"btn-get"
disabled
=
{
disabled
}
click
=
"btnGet"
>
<
button
type
=
"button"
className
=
"btn-get"
disabled
=
{
disabled
}
onClick
=
{
this
.
getCourse
}
>
免费领取
<
/button
>
:
<
button
type
=
"button"
className
=
"btn-get"
onClick
=
{
this
.
inviteFriends
}
>
<
button
type
=
"button"
className
=
"btn-get"
onClick
=
{()
=>
{
_czc
&&
_czc
.
push
([
"_trackEvent"
,
'中间页继续邀请好友'
,
'中间页继续邀请好友'
])
this
.
setState
({
friendStatus
:
true
})
}}
>
继续邀请好友
<
/button
>
}
...
...
@@ -289,6 +300,7 @@ class GiveCourseAssistance extends Component {
<
div
className
=
"btn-morewap"
>
<
button
type
=
"button"
className
=
"btn-more"
onClick
=
{()
=>
{
_czc
&&
_czc
.
push
([
"_trackEvent"
,
'中间页参与活动领更多课时'
,
'中间页参与活动领更多课时'
])
this
.
setState
({
activeStatus
:
true
})
}}
>
参与活动领更多课时
<
/button
>
...
...
src/components/activity/give-courses/index.js
View file @
d7ae3181
...
...
@@ -139,6 +139,8 @@ class GiveCourses extends Component {
<
li
className
=
'course-teacher'
><
span
className
=
'tag'
>
讲师
<
/span>{course
[
"teachers"
]
}</
li
>
<
li
className
=
'course-time'
><
span
className
=
'tag'
>
开课时间
<
/span>{course
[
"start_time"
]
}</
li
>
<
li
className
=
'toreceive'
onClick
=
{()
=>
{
_czc
&&
_czc
.
push
([
"_trackEvent"
,
`课程id=
${
course
.
course_id
}
`
,
'免费领取课程'
])
console
.
log
(
course
.
course_id
)
this
.
setState
({
isShow
:
true
})
}}
>
免费领取课程
<
/li
>
...
...
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