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
67718390
Commit
67718390
authored
Nov 02, 2019
by
xuzhenghua
Browse files
Options
Browse Files
Download
Plain Diff
pull
parents
f61f8135
9d9cc01d
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
356 additions
and
333 deletions
+356
-333
src/components/blessingPreheat/collectBlessing/index.js
+1
-1
src/components/blessingPreheat/courseList/index.js
+347
-327
src/components/blessingPreheat/index.js
+8
-5
No files found.
src/components/blessingPreheat/collectBlessing/index.js
View file @
67718390
...
@@ -8,7 +8,7 @@ import ListHeader from './../listHeader';
...
@@ -8,7 +8,7 @@ import ListHeader from './../listHeader';
import
'./index.scss'
;
import
'./index.scss'
;
@
connect
(({
user
})
=>
({
@
connect
(({
user
})
=>
({
uid
:
user
.
data
.
uid
||
''
uid
:
user
&&
user
.
data
&&
user
.
data
.
uid
?
user
.
data
.
uid
:
''
}))
}))
class
CollectBlessing
extends
Component
{
class
CollectBlessing
extends
Component
{
...
...
src/components/blessingPreheat/courseList/index.js
View file @
67718390
...
@@ -62,6 +62,27 @@ class CourseList extends Component {
...
@@ -62,6 +62,27 @@ class CourseList extends Component {
this
.
fetchAICourse
(
'four'
);
this
.
fetchAICourse
(
'four'
);
}
}
shouldComponentUpdate
(
nextProps
,
nextState
,
nextContext
)
{
if
(
this
.
props
.
isApp
!==
nextProps
.
isApp
)
{
// 精品课程-集训营、就业班/AI特训营
this
.
fetchCourseData
();
// AI之路-基础
this
.
fetchAICourse
(
'one'
);
// AI之路-进阶
this
.
fetchAICourse
(
'two'
);
// AI之路-高阶
this
.
fetchAICourse
(
'three'
);
// AI之路-拓展
this
.
fetchAICourse
(
'four'
);
return
false
;
}
return
true
;
}
fetchAICourse
=
(
key
)
=>
{
fetchAICourse
=
(
key
)
=>
{
const
{
basic
,
advanced
,
higher
,
expand
}
=
this
.
state
;
const
{
basic
,
advanced
,
higher
,
expand
}
=
this
.
state
;
http
.
get
(
`
${
API
.
home
}
/sys/ai_grow_up_courses/
${
key
}
`
).
then
(
res
=>
{
http
.
get
(
`
${
API
.
home
}
/sys/ai_grow_up_courses/
${
key
}
`
).
then
(
res
=>
{
...
@@ -221,8 +242,7 @@ class CourseList extends Component {
...
@@ -221,8 +242,7 @@ class CourseList extends Component {
}
}
toReceiveCoupon
(
id
,
key
=
''
)
{
toReceiveCoupon
(
id
,
key
=
''
)
{
const
{
isLogin
,
toLogin
,
uid
}
=
this
.
props
;
const
{
isLogin
,
toLogin
}
=
this
.
props
;
alert
(
uid
)
if
(
isLogin
)
{
if
(
isLogin
)
{
http
.
post
(
`
${
API
.
home
}
/sys/activity/coupon/receive`
,
{
http
.
post
(
`
${
API
.
home
}
/sys/activity/coupon/receive`
,
{
course_id
:
id
course_id
:
id
...
@@ -290,422 +310,422 @@ class CourseList extends Component {
...
@@ -290,422 +310,422 @@ class CourseList extends Component {
const
{
isFormal
}
=
this
.
props
;
const
{
isFormal
}
=
this
.
props
;
const
{
basic
,
advanced
,
higher
,
expand
,
group
,
training
}
=
this
.
state
;
const
{
basic
,
advanced
,
higher
,
expand
,
group
,
training
}
=
this
.
state
;
return
(
return
(
<
div
className
=
"boutique-course"
>
<
div
className
=
"boutique-course"
>
<
ListHeader
text
=
"集训营、就业班"
size
=
"middle"
styles
=
{{
margin
:
'20px 0 15px'
}}
/
>
<
ListHeader
text
=
"集训营、就业班"
size
=
"middle"
styles
=
{{
margin
:
'20px 0 15px'
}}
/
>
{
/* 集训营、就业班 */
}
{
/* 集训营、就业班 */
}
{
{
(
group
.
course
&&
group
.
course
.
length
>
0
)
&&
(
group
.
course
&&
group
.
course
.
length
>
0
)
&&
<>
<>
<
div
data
-
layout
=
"row"
>
<
div
data
-
layout
=
"row"
>
{
group
.
course
.
map
(
item
=>
(
<
CourseItem
image
=
{
item
.
image_name
}
key
=
{
item
.
course_id
}
id
=
{
item
.
course_id
}
toCourse
=
{
this
.
toCourse
}
>
<
div
className
=
"coupon-course__footer"
>
<
a
onClick
=
{()
=>
this
.
toQQque
()}
className
=
"course-button"
>
立抢超低团购价
<
/a
>
<
/div
>
<
/CourseItem
>
))
}
<
/div
>
{
{
group
.
course
.
map
(
item
=>
(
(
group
.
courseList
&&
group
.
courseList
.
length
>
2
)
&&
<
CourseItem
image
=
{
item
.
image_name
}
key
=
{
item
.
course_id
}
id
=
{
item
.
course_id
}
toCourse
=
{
this
.
toCourse
}
>
<
button
className
=
"more-button"
onClick
=
{()
=>
this
.
handleToMore
(
'group'
)}
>
<
div
className
=
"coupon-course__footer"
>
{
group
.
isMore
?
'展开更多'
:
'收起'
}
<
a
onClick
=
{()
=>
this
.
toQQque
()}
className
=
"course-button"
>
立抢超低团购价
<
/a
>
<
/button
>
<
/div
>
<
/CourseItem
>
))
}
}
<
/div
>
<
/
>
{
}
(
group
.
courseList
&&
group
.
courseList
.
length
>
2
)
&&
<
button
className
=
"more-button"
onClick
=
{()
=>
this
.
handleToMore
(
'group'
)}
>
{
group
.
isMore
?
'展开更多'
:
'收起'
}
<
/button
>
}
<
/
>
}
<
ListHeader
text
=
"AI特训营"
size
=
"middle"
styles
=
{{
margin
:
'0 0 15px'
}}
/
>
<
ListHeader
text
=
"AI特训营"
size
=
"middle"
styles
=
{{
margin
:
'0 0 15px'
}}
/
>
{
/* AI特训营 */
}
{
/* AI特训营 */
}
{
{
(
training
.
course
&&
training
.
course
.
length
>
0
)
&&
(
training
.
course
&&
training
.
course
.
length
>
0
)
&&
<>
<>
<
div
data
-
layout
=
"row"
>
<
div
data
-
layout
=
"row"
>
{
{
training
.
course
.
map
(
item
=>
(
training
.
course
.
map
(
item
=>
(
<
CourseItem
image
=
{
item
.
image_name
}
key
=
{
item
.
course_id
}
id
=
{
item
.
course_id
}
toCourse
=
{
this
.
toCourse
}
>
<
CourseItem
image
=
{
item
.
image_name
}
key
=
{
item
.
course_id
}
id
=
{
item
.
course_id
}
toCourse
=
{
this
.
toCourse
}
>
<
div
className
=
"coupon-course__footer"
>
<
div
className
=
"coupon-course__footer"
>
{
{
item
.
course_status
===
1
&&
item
.
course_status
===
1
&&
<
a
<
a
className
=
{
classnames
(
"coupon-course__button"
,
"coupon-course__button--receive"
)}
className
=
{
classnames
(
"coupon-course__button"
,
"coupon-course__button--receive"
)}
onClick
=
{()
=>
this
.
toReceiveCoupon
(
item
.
course_id
,
'training'
)}
onClick
=
{()
=>
this
.
toReceiveCoupon
(
item
.
course_id
,
'training'
)}
>
>
<
span
className
=
"coupon-course__button-price"
>
<
span
className
=
"coupon-course__button-price"
>
<
em
>
¥
{
item
.
coupon
}
<
/em
>
<
em
>
¥
{
item
.
coupon
}
<
/em
>
<
i
>
代金券
<
/i
>
<
i
>
代金券
<
/i
>
<
/span
>
<
/span
>
<
span
className
=
"coupon-course__button-label"
>
立即领券
<
/span
>
<
span
className
=
"coupon-course__button-label"
>
立即领券
<
/span
>
<
/a
>
<
/a
>
}
}
{
{
(
isFormal
===
0
&&
item
.
course_status
===
2
)
&&
(
isFormal
===
0
&&
item
.
course_status
===
2
)
&&
<
a
className
=
"coupon-course__button"
>
<
a
className
=
"coupon-course__button"
>
<
span
className
=
"coupon-course__button-price"
>
<
span
className
=
"coupon-course__button-price"
>
<
em
>
¥
{
item
.
coupon
}
<
/em
>
<
em
>
¥
{
item
.
coupon
}
<
/em
>
<
i
>
代金券
<
/i
>
<
i
>
代金券
<
/i
>
<
/span
>
<
/span
>
<
span
className
=
"coupon-course__button-label"
>
11.11
开始使用
<
/span
>
<
span
className
=
"coupon-course__button-label"
>
11.11
开始使用
<
/span
>
<
/a
>
<
/a
>
}
}
{
{
(
isFormal
===
1
&&
item
.
course_status
===
2
)
&&
(
isFormal
===
1
&&
item
.
course_status
===
2
)
&&
<
a
<
a
onClick
=
{()
=>
this
.
toCourse
(
item
.
course_id
)}
onClick
=
{()
=>
this
.
toCourse
(
item
.
course_id
)}
className
=
"coupon-course__button"
>
className
=
"coupon-course__button"
>
<
span
className
=
"coupon-course__button-price"
>
<
span
className
=
"coupon-course__button-price"
>
<
em
>
¥
{
item
.
coupon
}
<
/em
>
<
em
>
¥
{
item
.
coupon
}
<
/em
>
<
i
>
代金券
<
/i
>
<
i
>
代金券
<
/i
>
<
/span
>
<
/span
>
<
span
className
=
"coupon-course__button-label"
>
开始使用
<
/span
>
<
span
className
=
"coupon-course__button-label"
>
开始使用
<
/span
>
<
/a
>
<
/a
>
}
}
{
{
item
.
course_status
===
3
&&
item
.
course_status
===
3
&&
<
a
onClick
=
{()
=>
this
.
toCourse
(
item
.
course_id
)}
<
a
onClick
=
{()
=>
this
.
toCourse
(
item
.
course_id
)}
className
=
"course-button"
className
=
"course-button"
data
-
type
=
"study"
data
-
type
=
"study"
>
开始学习
<
/a
>
>
开始学习
<
/a
>
}
}
<
/div
>
<
/div
>
<
/CourseItem
>
<
/CourseItem
>
))
))
}
<
/div
>
{
(
training
.
courseList
&&
training
.
courseList
.
length
>
2
)
&&
<
button
className
=
"more-button"
onClick
=
{()
=>
this
.
handleToMore
(
'training'
)}
>
{
training
.
isMore
?
'展开更多'
:
'收起'
}
<
/button
>
}
}
<
/div
>
<
/
>
{
}
(
training
.
courseList
&&
training
.
courseList
.
length
>
2
)
&&
<
button
className
=
"more-button"
onClick
=
{()
=>
this
.
handleToMore
(
'training'
)}
>
{
training
.
isMore
?
'展开更多'
:
'收起'
}
<
/button
>
}
<
/
>
}
{
/* AI成长之路--基础 */
}
{
/* AI成长之路--基础 */
}
<
ListHeader
text
=
"AI成长之路"
size
=
"middle"
styles
=
{{
margin
:
'0 0 15px'
}}
/
>
<
ListHeader
text
=
"AI成长之路"
size
=
"middle"
styles
=
{{
margin
:
'0 0 15px'
}}
/
>
{
{
(
basic
.
course
&&
basic
.
course
.
length
>
0
)
&&
(
basic
.
course
&&
basic
.
course
.
length
>
0
)
&&
<>
<>
<
h4
className
=
"ai-course__subtitle"
>
基础
<
/h4
>
<
h4
className
=
"ai-course__subtitle"
>
基础
<
/h4
>
<
div
data
-
layout
=
"row"
>
<
div
data
-
layout
=
"row"
>
{
{
basic
.
course
.
map
(
item
=>
(
basic
.
course
.
map
(
item
=>
(
<
CourseItem
image
=
{
item
.
image_name
}
key
=
{
item
.
course_id
}
id
=
{
item
.
course_id
}
toCourse
=
{
this
.
toCourse
}
>
<
CourseItem
image
=
{
item
.
image_name
}
key
=
{
item
.
course_id
}
id
=
{
item
.
course_id
}
toCourse
=
{
this
.
toCourse
}
>
{
item
.
type
===
0
&&
<
div
className
=
"coupon-course__footer"
>
{
{
item
.
course_status
===
1
&&
item
.
type
===
0
&&
<
a
<
div
className
=
"coupon-course__footer"
>
className
=
{
classnames
(
"coupon-course__button"
,
"coupon-course__button--receive"
)}
{
onClick
=
{()
=>
this
.
toReceiveCoupon
(
item
.
course_id
,
'basic'
)}
item
.
course_status
===
1
&&
>
<
a
className
=
{
classnames
(
"coupon-course__button"
,
"coupon-course__button--receive"
)}
onClick
=
{()
=>
this
.
toReceiveCoupon
(
item
.
course_id
,
'basic'
)}
>
<
span
className
=
"coupon-course__button-price"
>
<
span
className
=
"coupon-course__button-price"
>
<
em
>
¥
{
item
.
coupon
}
<
/em
>
<
em
>
¥
{
item
.
coupon
}
<
/em
>
<
i
>
代金券
<
/i
>
<
i
>
代金券
<
/i
>
<
/span
>
<
/span
>
<
span
className
=
"coupon-course__button-label"
>
立即领券
<
/span
>
<
span
className
=
"coupon-course__button-label"
>
立即领券
<
/span
>
<
/a
>
<
/a
>
}
}
{
{
(
isFormal
===
0
&&
item
.
course_status
===
2
)
&&
(
isFormal
===
0
&&
item
.
course_status
===
2
)
&&
<
a
className
=
"coupon-course__button"
>
<
a
className
=
"coupon-course__button"
>
<
span
className
=
"coupon-course__button-price"
>
<
span
className
=
"coupon-course__button-price"
>
<
em
>
¥
{
item
.
coupon
}
<
/em
>
<
em
>
¥
{
item
.
coupon
}
<
/em
>
<
i
>
代金券
<
/i
>
<
i
>
代金券
<
/i
>
<
/span
>
<
/span
>
<
span
className
=
"coupon-course__button-label"
>
11.11
开始使用
<
/span
>
<
span
className
=
"coupon-course__button-label"
>
11.11
开始使用
<
/span
>
<
/a
>
<
/a
>
}
}
{
{
(
isFormal
===
1
&&
item
.
course_status
===
2
)
&&
(
isFormal
===
1
&&
item
.
course_status
===
2
)
&&
<
a
onClick
=
{()
=>
this
.
toCourse
(
item
.
course_id
)}
className
=
"coupon-course__button"
>
<
a
onClick
=
{()
=>
this
.
toCourse
(
item
.
course_id
)}
className
=
"coupon-course__button"
>
<
span
className
=
"coupon-course__button-price"
>
<
span
className
=
"coupon-course__button-price"
>
<
em
>
¥
{
item
.
coupon
}
<
/em
>
<
em
>
¥
{
item
.
coupon
}
<
/em
>
<
i
>
代金券
<
/i
>
<
i
>
代金券
<
/i
>
<
/span
>
<
/span
>
<
span
className
=
"coupon-course__button-label"
>
开始使用
<
/span
>
<
span
className
=
"coupon-course__button-label"
>
开始使用
<
/span
>
<
/a
>
<
/a
>
}
}
{
{
item
.
course_status
===
3
&&
item
.
course_status
===
3
&&
<
a
onClick
=
{()
=>
this
.
toCourse
(
item
.
course_id
)}
<
a
onClick
=
{()
=>
this
.
toCourse
(
item
.
course_id
)}
className
=
"course-button"
className
=
"course-button"
data
-
type
=
"study"
data
-
type
=
"study"
>
开始学习
<
/a
>
>
开始学习
<
/a
>
}
<
/div
>
}
}
<
/div
>
}
{
item
.
type
===
1
&&
<
div
className
=
"cent-course__footer"
>
{
{
item
.
course_status
===
1
&&
item
.
type
===
1
&&
<
a
onClick
=
{()
=>
this
.
toCourse
(
item
.
course_id
)}
className
=
"course-button"
>
1
分钱开团
<
/a
>
<
div
className
=
"cent-course__footer"
>
{
item
.
course_status
===
1
&&
<
a
onClick
=
{()
=>
this
.
toCourse
(
item
.
course_id
)}
className
=
"course-button"
>
1
分钱开团
<
/a
>
}
{
item
.
course_status
===
3
&&
<
a
onClick
=
{()
=>
this
.
toCourse
(
item
.
course_id
)}
className
=
"course-button"
data
-
type
=
"study"
>
开始学习
<
/a
>
}
<
/div
>
}
}
{
<
/CourseItem
>
item
.
course_status
===
3
&&
))
<
a
onClick
=
{()
=>
this
.
toCourse
(
item
.
course_id
)}
className
=
"course-button"
data
-
type
=
"study"
>
开始学习
<
/a
>
}
}
<
/div
>
<
/div
>
{
}
(
basic
.
courseList
&&
basic
.
courseList
.
length
>
4
)
&&
<
/CourseItem
>
<
button
className
=
"more-button"
onClick
=
{()
=>
this
.
handleToMore
(
'basic'
)}
>
))
{
basic
.
isMore
?
'展开更多'
:
'收起'
}
<
/button
>
}
}
<
/div
>
<
/
>
{
}
(
basic
.
courseList
&&
basic
.
courseList
.
length
>
4
)
&&
<
button
className
=
"more-button"
onClick
=
{()
=>
this
.
handleToMore
(
'basic'
)}
>
{
basic
.
isMore
?
'展开更多'
:
'收起'
}
<
/button
>
}
<
/
>
}
{
/* AI成长之路--进阶 */
}
{
/* AI成长之路--进阶 */
}
{
{
(
advanced
.
course
&&
advanced
.
course
.
length
>
0
)
&&
(
advanced
.
course
&&
advanced
.
course
.
length
>
0
)
&&
<>
<>
<
h4
className
=
"ai-course__subtitle"
>
进阶
<
/h4
>
<
h4
className
=
"ai-course__subtitle"
>
进阶
<
/h4
>
<
div
data
-
layout
=
"row"
>
<
div
data
-
layout
=
"row"
>
{
{
advanced
.
course
.
map
(
item
=>
(
advanced
.
course
.
map
(
item
=>
(
<
CourseItem
image
=
{
item
.
image_name
}
key
=
{
item
.
course_id
}
id
=
{
item
.
course_id
}
toCourse
=
{
this
.
toCourse
}
>
<
CourseItem
image
=
{
item
.
image_name
}
key
=
{
item
.
course_id
}
id
=
{
item
.
course_id
}
toCourse
=
{
this
.
toCourse
}
>
{
item
.
type
===
0
&&
<
div
className
=
"coupon-course__footer"
>
{
{
item
.
course_status
===
1
&&
item
.
type
===
0
&&
<
a
<
div
className
=
"coupon-course__footer"
>
className
=
{
classnames
(
"coupon-course__button"
,
"coupon-course__button--receive"
)}
{
onClick
=
{()
=>
this
.
toReceiveCoupon
(
item
.
course_id
,
'advanced'
)}
item
.
course_status
===
1
&&
>
<
a
className
=
{
classnames
(
"coupon-course__button"
,
"coupon-course__button--receive"
)}
onClick
=
{()
=>
this
.
toReceiveCoupon
(
item
.
course_id
,
'advanced'
)}
>
<
span
className
=
"coupon-course__button-price"
>
<
span
className
=
"coupon-course__button-price"
>
<
em
>
¥
{
item
.
coupon
}
<
/em
>
<
em
>
¥
{
item
.
coupon
}
<
/em
>
<
i
>
代金券
<
/i
>
<
i
>
代金券
<
/i
>
<
/span
>
<
/span
>
<
span
className
=
"coupon-course__button-label"
>
立即领券
<
/span
>
<
span
className
=
"coupon-course__button-label"
>
立即领券
<
/span
>
<
/a
>
<
/a
>
}
}
{
{
(
isFormal
===
0
&&
item
.
course_status
===
2
)
&&
(
isFormal
===
0
&&
item
.
course_status
===
2
)
&&
<
a
className
=
"coupon-course__button"
>
<
a
className
=
"coupon-course__button"
>
<
span
className
=
"coupon-course__button-price"
>
<
span
className
=
"coupon-course__button-price"
>
<
em
>
¥
{
item
.
coupon
}
<
/em
>
<
em
>
¥
{
item
.
coupon
}
<
/em
>
<
i
>
代金券
<
/i
>
<
i
>
代金券
<
/i
>
<
/span
>
<
/span
>
<
span
className
=
"coupon-course__button-label"
>
11.11
开始使用
<
/span
>
<
span
className
=
"coupon-course__button-label"
>
11.11
开始使用
<
/span
>
<
/a
>
<
/a
>
}
}
{
{
(
isFormal
===
1
&&
item
.
course_status
===
2
)
&&
(
isFormal
===
1
&&
item
.
course_status
===
2
)
&&
<
a
onClick
=
{()
=>
this
.
toCourse
(
item
.
course_id
)}
className
=
"coupon-course__button"
>
<
a
onClick
=
{()
=>
this
.
toCourse
(
item
.
course_id
)}
className
=
"coupon-course__button"
>
<
span
className
=
"coupon-course__button-price"
>
<
span
className
=
"coupon-course__button-price"
>
<
em
>
¥
{
item
.
coupon
}
<
/em
>
<
em
>
¥
{
item
.
coupon
}
<
/em
>
<
i
>
代金券
<
/i
>
<
i
>
代金券
<
/i
>
<
/span
>
<
/span
>
<
span
className
=
"coupon-course__button-label"
>
开始使用
<
/span
>
<
span
className
=
"coupon-course__button-label"
>
开始使用
<
/span
>
<
/a
>
<
/a
>
}
{
item
.
course_status
===
3
&&
<
a
onClick
=
{()
=>
this
.
toCourse
(
item
.
course_id
)}
className
=
"course-button"
data
-
type
=
"study"
>
开始学习
<
/a
>
}
<
/div
>
}
}
{
{
item
.
course_status
===
3
&&
item
.
type
===
1
&&
<
a
onClick
=
{()
=>
this
.
toCourse
(
item
.
course_id
)}
<
div
className
=
"cent-course__footer"
>
className
=
"course-button"
{
data
-
type
=
"study"
item
.
course_status
===
1
&&
>
开始学习
<
/a
>
<
a
onClick
=
{()
=>
this
.
toCourse
(
item
.
course_id
)}
className
=
"course-button"
>
1
分钱开团
<
/a
>
}
{
item
.
course_status
===
3
&&
<
a
onClick
=
{()
=>
this
.
toCourse
(
item
.
course_id
)}
className
=
"course-button"
data
-
type
=
"study"
>
开始学习
<
/a
>
}
<
/div
>
}
}
<
/div
>
<
/CourseItem
>
}
))
{
}
item
.
type
===
1
&&
<
/div
>
<
div
className
=
"cent-course__footer"
>
{
{
(
advanced
.
courseList
&&
advanced
.
courseList
.
length
>
4
)
&&
item
.
course_status
===
1
&&
<
button
className
=
"more-button"
onClick
=
{()
=>
this
.
handleToMore
(
'advanced'
)}
>
<
a
onClick
=
{()
=>
this
.
toCourse
(
item
.
course_id
)}
className
=
"course-button"
>
1
分钱开团
<
/a
>
{
advanced
.
isMore
?
'展开更多'
:
'收起'
}
}
<
/button
>
{
item
.
course_status
===
3
&&
<
a
onClick
=
{()
=>
this
.
toCourse
(
item
.
course_id
)}
className
=
"course-button"
data
-
type
=
"study"
>
开始学习
<
/a
>
}
<
/div
>
}
<
/CourseItem
>
))
}
}
<
/div
>
<
/
>
{
}
(
advanced
.
courseList
&&
advanced
.
courseList
.
length
>
4
)
&&
<
button
className
=
"more-button"
onClick
=
{()
=>
this
.
handleToMore
(
'advanced'
)}
>
{
advanced
.
isMore
?
'展开更多'
:
'收起'
}
<
/button
>
}
<
/
>
}
{
/* AI成长之路--高阶 */
}
{
/* AI成长之路--高阶 */
}
{
{
(
higher
.
course
&&
higher
.
course
.
length
>
0
)
&&
(
higher
.
course
&&
higher
.
course
.
length
>
0
)
&&
<>
<>
<
h4
className
=
"ai-course__subtitle"
>
高阶
<
/h4
>
<
h4
className
=
"ai-course__subtitle"
>
高阶
<
/h4
>
<
div
data
-
layout
=
"row"
>
<
div
data
-
layout
=
"row"
>
{
{
higher
.
course
.
map
(
item
=>
(
higher
.
course
.
map
(
item
=>
(
<
CourseItem
image
=
{
item
.
image_name
}
key
=
{
item
.
course_id
}
id
=
{
item
.
course_id
}
toCourse
=
{
this
.
toCourse
}
>
<
CourseItem
image
=
{
item
.
image_name
}
key
=
{
item
.
course_id
}
id
=
{
item
.
course_id
}
toCourse
=
{
this
.
toCourse
}
>
{
item
.
type
===
0
&&
<
div
className
=
"coupon-course__footer"
>
{
{
item
.
course_status
===
1
&&
item
.
type
===
0
&&
<
a
<
div
className
=
"coupon-course__footer"
>
className
=
{
classnames
(
"coupon-course__button"
,
"coupon-course__button--receive"
)}
{
onClick
=
{()
=>
this
.
toReceiveCoupon
(
item
.
course_id
,
'higher'
)}
item
.
course_status
===
1
&&
>
<
a
className
=
{
classnames
(
"coupon-course__button"
,
"coupon-course__button--receive"
)}
onClick
=
{()
=>
this
.
toReceiveCoupon
(
item
.
course_id
,
'higher'
)}
>
<
span
className
=
"coupon-course__button-price"
>
<
span
className
=
"coupon-course__button-price"
>
<
em
>
¥
{
item
.
coupon
}
<
/em
>
<
em
>
¥
{
item
.
coupon
}
<
/em
>
<
i
>
代金券
<
/i
>
<
i
>
代金券
<
/i
>
<
/span
>
<
/span
>
<
span
className
=
"coupon-course__button-label"
>
立即领券
<
/span
>
<
span
className
=
"coupon-course__button-label"
>
立即领券
<
/span
>
<
/a
>
<
/a
>
}
}
{
{
(
isFormal
===
0
&&
item
.
course_status
===
2
)
&&
(
isFormal
===
0
&&
item
.
course_status
===
2
)
&&
<
a
className
=
"coupon-course__button"
>
<
a
className
=
"coupon-course__button"
>
<
span
className
=
"coupon-course__button-price"
>
<
span
className
=
"coupon-course__button-price"
>
<
em
>
¥
{
item
.
coupon
}
<
/em
>
<
em
>
¥
{
item
.
coupon
}
<
/em
>
<
i
>
代金券
<
/i
>
<
i
>
代金券
<
/i
>
<
/span
>
<
/span
>
<
span
className
=
"coupon-course__button-label"
>
11.11
开始使用
<
/span
>
<
span
className
=
"coupon-course__button-label"
>
11.11
开始使用
<
/span
>
<
/a
>
<
/a
>
}
}
{
{
(
isFormal
===
1
&&
item
.
course_status
===
2
)
&&
(
isFormal
===
1
&&
item
.
course_status
===
2
)
&&
<
a
onClick
=
{()
=>
this
.
toCourse
(
item
.
course_id
)}
className
=
"coupon-course__button"
>
<
a
onClick
=
{()
=>
this
.
toCourse
(
item
.
course_id
)}
className
=
"coupon-course__button"
>
<
span
className
=
"coupon-course__button-price"
>
<
span
className
=
"coupon-course__button-price"
>
<
em
>
¥
{
item
.
coupon
}
<
/em
>
<
em
>
¥
{
item
.
coupon
}
<
/em
>
<
i
>
代金券
<
/i
>
<
i
>
代金券
<
/i
>
<
/span
>
<
/span
>
<
span
className
=
"coupon-course__button-label"
>
开始使用
<
/span
>
<
span
className
=
"coupon-course__button-label"
>
开始使用
<
/span
>
<
/a
>
<
/a
>
}
}
{
{
item
.
course_status
===
3
&&
item
.
course_status
===
3
&&
<
a
onClick
=
{()
=>
this
.
toCourse
(
item
.
course_id
)}
<
a
onClick
=
{()
=>
this
.
toCourse
(
item
.
course_id
)}
className
=
"course-button"
className
=
"course-button"
data
-
type
=
"study"
data
-
type
=
"study"
>
开始学习
<
/a
>
>
开始学习
<
/a
>
}
}
<
/div
>
<
/div
>
}
{
item
.
type
===
1
&&
<
div
className
=
"cent-course__footer"
>
{
item
.
course_status
===
1
&&
<
a
onClick
=
{()
=>
this
.
toCourse
(
item
.
course_id
)}
className
=
"course-button"
>
1
分钱开团
<
/a
>
}
}
{
{
item
.
course_status
===
3
&&
item
.
type
===
1
&&
<
a
onClick
=
{()
=>
this
.
toCourse
(
item
.
course_id
)}
className
=
"course-button"
data
-
type
=
"study"
>
开始学习
<
/a
>
<
div
className
=
"cent-course__footer"
>
{
item
.
course_status
===
1
&&
<
a
onClick
=
{()
=>
this
.
toCourse
(
item
.
course_id
)}
className
=
"course-button"
>
1
分钱开团
<
/a
>
}
{
item
.
course_status
===
3
&&
<
a
onClick
=
{()
=>
this
.
toCourse
(
item
.
course_id
)}
className
=
"course-button"
data
-
type
=
"study"
>
开始学习
<
/a
>
}
<
/div
>
}
}
<
/div
>
<
/CourseItem
>
}
))
<
/CourseItem
>
}
))
<
/div
>
{
(
higher
.
courseList
&&
higher
.
courseList
.
length
>
4
)
&&
<
button
className
=
"more-button"
onClick
=
{()
=>
this
.
handleToMore
(
'higher'
)}
>
{
higher
.
isMore
?
'展开更多'
:
'收起'
}
<
/button
>
}
}
<
/div
>
<
/
>
{
}
(
higher
.
courseList
&&
higher
.
courseList
.
length
>
4
)
&&
<
button
className
=
"more-button"
onClick
=
{()
=>
this
.
handleToMore
(
'higher'
)}
>
{
higher
.
isMore
?
'展开更多'
:
'收起'
}
<
/button
>
}
<
/
>
}
{
/* AI成长之路--扩展 */
}
{
/* AI成长之路--扩展 */
}
{
{
(
expand
.
course
&&
expand
.
course
.
length
>
0
)
&&
(
expand
.
course
&&
expand
.
course
.
length
>
0
)
&&
<>
<>
<
h4
className
=
"ai-course__subtitle"
>
扩展
<
/h4
>
<
h4
className
=
"ai-course__subtitle"
>
扩展
<
/h4
>
<
div
data
-
layout
=
"row"
>
<
div
data
-
layout
=
"row"
>
{
{
expand
.
course
.
map
(
item
=>
(
expand
.
course
.
map
(
item
=>
(
<
CourseItem
image
=
{
item
.
image_name
}
key
=
{
item
.
course_id
}
id
=
{
item
.
course_id
}
toCourse
=
{
this
.
toCourse
}
>
<
CourseItem
image
=
{
item
.
image_name
}
key
=
{
item
.
course_id
}
id
=
{
item
.
course_id
}
toCourse
=
{
this
.
toCourse
}
>
{
item
.
type
===
0
&&
<
div
className
=
"coupon-course__footer"
>
{
{
item
.
course_status
===
1
&&
item
.
type
===
0
&&
<
a
<
div
className
=
"coupon-course__footer"
>
className
=
{
classnames
(
"coupon-course__button"
,
"coupon-course__button--receive"
)}
{
onClick
=
{()
=>
this
.
toReceiveCoupon
(
item
.
course_id
,
'expand'
)}
item
.
course_status
===
1
&&
>
<
a
className
=
{
classnames
(
"coupon-course__button"
,
"coupon-course__button--receive"
)}
onClick
=
{()
=>
this
.
toReceiveCoupon
(
item
.
course_id
,
'expand'
)}
>
<
span
className
=
"coupon-course__button-price"
>
<
span
className
=
"coupon-course__button-price"
>
<
em
>
¥
{
item
.
coupon
}
<
/em
>
<
em
>
¥
{
item
.
coupon
}
<
/em
>
<
i
>
代金券
<
/i
>
<
i
>
代金券
<
/i
>
<
/span
>
<
/span
>
<
span
className
=
"coupon-course__button-label"
>
立即领券
<
/span
>
<
span
className
=
"coupon-course__button-label"
>
立即领券
<
/span
>
<
/a
>
<
/a
>
}
}
{
{
(
isFormal
===
0
&&
item
.
course_status
===
2
)
&&
(
isFormal
===
0
&&
item
.
course_status
===
2
)
&&
<
a
className
=
"coupon-course__button"
>
<
a
className
=
"coupon-course__button"
>
<
span
className
=
"coupon-course__button-price"
>
<
span
className
=
"coupon-course__button-price"
>
<
em
>
¥
{
item
.
coupon
}
<
/em
>
<
em
>
¥
{
item
.
coupon
}
<
/em
>
<
i
>
代金券
<
/i
>
<
i
>
代金券
<
/i
>
<
/span
>
<
/span
>
<
span
className
=
"coupon-course__button-label"
>
11.11
开始使用
<
/span
>
<
span
className
=
"coupon-course__button-label"
>
11.11
开始使用
<
/span
>
<
/a
>
<
/a
>
}
}
{
{
(
isFormal
===
1
&&
item
.
course_status
===
2
)
&&
(
isFormal
===
1
&&
item
.
course_status
===
2
)
&&
<
a
onClick
=
{()
=>
this
.
toCourse
(
item
.
course_id
)}
className
=
"coupon-course__button"
>
<
a
onClick
=
{()
=>
this
.
toCourse
(
item
.
course_id
)}
className
=
"coupon-course__button"
>
<
span
className
=
"coupon-course__button-price"
>
<
span
className
=
"coupon-course__button-price"
>
<
em
>
¥
{
item
.
coupon
}
<
/em
>
<
em
>
¥
{
item
.
coupon
}
<
/em
>
<
i
>
代金券
<
/i
>
<
i
>
代金券
<
/i
>
<
/span
>
<
/span
>
<
span
className
=
"coupon-course__button-label"
>
开始使用
<
/span
>
<
span
className
=
"coupon-course__button-label"
>
开始使用
<
/span
>
<
/a
>
<
/a
>
}
{
item
.
course_status
===
3
&&
<
a
onClick
=
{()
=>
this
.
toCourse
(
item
.
course_id
)}
className
=
"course-button"
data
-
type
=
"study"
>
开始学习
<
/a
>
}
<
/div
>
}
}
{
{
item
.
course_status
===
3
&&
item
.
type
===
1
&&
<
a
onClick
=
{()
=>
this
.
toCourse
(
item
.
course_id
)}
<
div
className
=
"cent-course__footer"
>
className
=
"course-button"
{
data
-
type
=
"study"
item
.
course_status
===
1
&&
>
开始学习
<
/a
>
<
a
onClick
=
{()
=>
this
.
toCourse
(
item
.
course_id
)}
className
=
"course-button"
>
1
分钱开团
<
/a
>
}
{
item
.
course_status
===
3
&&
<
a
onClick
=
{()
=>
this
.
toCourse
(
item
.
course_id
)}
className
=
"course-button"
data
-
type
=
"study"
>
开始学习
<
/a
>
}
<
/div
>
}
}
<
/div
>
<
/CourseItem
>
}
))
{
}
item
.
type
===
1
&&
<
/div
>
<
div
className
=
"cent-course__footer"
>
{
{
(
expand
.
courseList
&&
expand
.
courseList
.
length
>
4
)
&&
item
.
course_status
===
1
&&
<
button
className
=
"more-button"
onClick
=
{()
=>
this
.
handleToMore
(
'expand'
)}
>
<
a
onClick
=
{()
=>
this
.
toCourse
(
item
.
course_id
)}
className
=
"course-button"
>
1
分钱开团
<
/a
>
{
expand
.
isMore
?
'展开更多'
:
'收起'
}
}
<
/button
>
{
item
.
course_status
===
3
&&
<
a
onClick
=
{()
=>
this
.
toCourse
(
item
.
course_id
)}
className
=
"course-button"
data
-
type
=
"study"
>
开始学习
<
/a
>
}
<
/div
>
}
<
/CourseItem
>
))
}
}
<
/div
>
<
/
>
{
}
(
expand
.
courseList
&&
expand
.
courseList
.
length
>
4
)
&&
<
/div
>
<
button
className
=
"more-button"
onClick
=
{()
=>
this
.
handleToMore
(
'expand'
)}
>
{
expand
.
isMore
?
'展开更多'
:
'收起'
}
<
/button
>
}
<
/
>
}
<
/div
>
)
)
}
}
}
}
...
...
src/components/blessingPreheat/index.js
View file @
67718390
...
@@ -81,7 +81,8 @@ class BlessingPreheat extends Component {
...
@@ -81,7 +81,8 @@ class BlessingPreheat extends Component {
},
},
],
],
index
:
0
,
index
:
0
,
userHasError
:
props
.
user
.
hasError
userHasError
:
props
.
user
.
hasError
,
isApp
:
false
}
}
}
}
...
@@ -110,7 +111,6 @@ class BlessingPreheat extends Component {
...
@@ -110,7 +111,6 @@ class BlessingPreheat extends Component {
this
.
handleToAddBlessing
(
result
);
this
.
handleToAddBlessing
(
result
);
}
}
}
}
...
@@ -138,6 +138,9 @@ class BlessingPreheat extends Component {
...
@@ -138,6 +138,9 @@ class BlessingPreheat extends Component {
if
(
cookie
.
get
(
"token"
)
&&
cookie
.
get
(
"uid"
))
{
if
(
cookie
.
get
(
"token"
)
&&
cookie
.
get
(
"uid"
))
{
this
.
fetchUserBlessing
();
this
.
fetchUserBlessing
();
this
.
setState
({
isApp
:
true
})
}
}
this
.
props
.
setCurrentUser
(
this
.
transformUser
(
this
.
state
.
userInfoList
))
this
.
props
.
setCurrentUser
(
this
.
transformUser
(
this
.
state
.
userInfoList
))
...
@@ -419,11 +422,11 @@ class BlessingPreheat extends Component {
...
@@ -419,11 +422,11 @@ class BlessingPreheat extends Component {
isSign
,
isSign
,
showRecordList
,
showRecordList
,
shareMark
,
shareMark
,
index
index
,
isApp
}
=
this
.
state
;
}
=
this
.
state
;
const
{
history
}
=
this
.
props
;
const
{
history
}
=
this
.
props
;
const
isLogin
=
!
this
.
props
.
user
.
hasError
const
isLogin
=
!
this
.
props
.
user
.
hasError
const
uid
=
this
.
props
.
user
.
data
.
uid
return
(
return
(
<
div
id
=
{
'blessing-preheat'
}
>
<
div
id
=
{
'blessing-preheat'
}
>
<
Banner
<
Banner
...
@@ -473,9 +476,9 @@ class BlessingPreheat extends Component {
...
@@ -473,9 +476,9 @@ class BlessingPreheat extends Component {
{
/* 精品课程特惠专区 */
}
{
/* 精品课程特惠专区 */
}
<
ListHeader
id
=
{
'best-courses'
}
text
=
"精品课程特惠专区"
styles
=
{{
margin
:
'30px 0 15px'
}}
/
>
<
ListHeader
id
=
{
'best-courses'
}
text
=
"精品课程特惠专区"
styles
=
{{
margin
:
'30px 0 15px'
}}
/
>
<
CourseList
<
CourseList
isApp
=
{
isApp
}
isFormal
=
{
isFormal
}
isFormal
=
{
isFormal
}
isLogin
=
{
isLogin
}
isLogin
=
{
isLogin
}
uid
=
{
uid
}
history
=
{
this
.
props
.
history
}
history
=
{
this
.
props
.
history
}
toLogin
=
{
this
.
toLogin
}
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