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
31d8686f
Commit
31d8686f
authored
Sep 22, 2020
by
zhanghaozhe
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
搜索结果免费课程
parent
d81aeb2a
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
16 additions
and
3 deletions
+16
-3
src/common/VList/index.js
+8
-1
src/components/search/search-result.js
+8
-2
No files found.
src/common/VList/index.js
View file @
31d8686f
...
...
@@ -6,7 +6,14 @@ const VList = (props) => {
<
li
className
=
"v-list-item"
onClick
=
{()
=>
{
typeof
props
.
toDetail
===
"function"
&&
props
.
toDetail
(
props
.
id
)
if
(
typeof
props
.
toDetail
!==
"function"
)
{
return
}
if
(
props
.
needCourseInfo
)
{
props
.
toDetail
(
props
.
course
)
}
else
{
props
.
toDetail
(
props
.
id
)
}
}}
>
<
div
className
=
"content"
>
...
...
src/components/search/search-result.js
View file @
31d8686f
...
...
@@ -73,9 +73,13 @@ class SearchResult extends PureComponent {
this
.
setState
({
value
})
}
toCourseDetail
=
(
id
)
=>
{
toCourseDetail
=
(
{
course_id
,
v_course_id
}
)
=>
{
const
{
history
}
=
this
.
props
history
.
push
(
`/detail?id=
${
id
}
`
)
history
.
push
(
course_id
===
0
?
`/play/video?id=
${
v_course_id
}
`
:
`/detail?id=
${
course_id
}
`
)
}
handleScroll
=
throttle
(()
=>
{
...
...
@@ -186,7 +190,9 @@ class SearchResult extends PureComponent {
key
=
{
index
}
info
=
{
Info
}
id
=
{
item
[
"course_id"
]}
course
=
{
item
}
status
=
{
status
}
needCourseInfo
/>
)
})}
...
...
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