|
|
@ -13,6 +13,7 @@ function LessonPlayList({ |
|
|
|
realCategories, |
|
|
|
realCategories, |
|
|
|
vods, |
|
|
|
vods, |
|
|
|
theme, |
|
|
|
theme, |
|
|
|
|
|
|
|
userId |
|
|
|
}: any) { |
|
|
|
}: any) { |
|
|
|
const bookId = localStorage.getItem("bookId"); |
|
|
|
const bookId = localStorage.getItem("bookId"); |
|
|
|
const [open, setOpen] = useState(false); |
|
|
|
const [open, setOpen] = useState(false); |
|
|
@ -62,7 +63,7 @@ function LessonPlayList({ |
|
|
|
{bookId ? ( |
|
|
|
{bookId ? ( |
|
|
|
category.map((video: any, i: any) => ( |
|
|
|
category.map((video: any, i: any) => ( |
|
|
|
<Link |
|
|
|
<Link |
|
|
|
to={video.isFreeVod ? "/video/" + video.id : "#"} |
|
|
|
to={video.isFreeVod || +userId === 140 ? "/video/" + video.id : "#"} |
|
|
|
className={ |
|
|
|
className={ |
|
|
|
"lesson-playlist__item d-flex align-items-center" + |
|
|
|
"lesson-playlist__item d-flex align-items-center" + |
|
|
|
" " + |
|
|
|
" " + |
|
|
@ -72,7 +73,7 @@ function LessonPlayList({ |
|
|
|
key={i} |
|
|
|
key={i} |
|
|
|
id={"listItem" + video.id} |
|
|
|
id={"listItem" + video.id} |
|
|
|
onClick={() => |
|
|
|
onClick={() => |
|
|
|
video.isFreeVod ? setVideoActive(video) : setOpen(true) |
|
|
|
video.isFreeVod || +userId === 140 ? setVideoActive(video) : setOpen(true) |
|
|
|
} |
|
|
|
} |
|
|
|
> |
|
|
|
> |
|
|
|
<span className="lesson-playlist__item--count"> |
|
|
|
<span className="lesson-playlist__item--count"> |
|
|
@ -98,7 +99,7 @@ function LessonPlayList({ |
|
|
|
)) |
|
|
|
)) |
|
|
|
) : ( |
|
|
|
) : ( |
|
|
|
<Link |
|
|
|
<Link |
|
|
|
to={category.isFreeVod ? "/video/" + category.id : "#"} |
|
|
|
to={category.isFreeVod || +userId === 140 ? "/video/" + category.id : "#"} |
|
|
|
className={ |
|
|
|
className={ |
|
|
|
"lesson-playlist__item d-flex align-items-center" + |
|
|
|
"lesson-playlist__item d-flex align-items-center" + |
|
|
|
" " + |
|
|
|
" " + |
|
|
@ -106,7 +107,7 @@ function LessonPlayList({ |
|
|
|
"lesson-playlist__item--active") |
|
|
|
"lesson-playlist__item--active") |
|
|
|
} |
|
|
|
} |
|
|
|
onClick={() => |
|
|
|
onClick={() => |
|
|
|
category.isFreeVod ? setVideoActive(category) : setOpen(true) |
|
|
|
category.isFreeVod || +userId === 140 ? setVideoActive(category) : setOpen(true) |
|
|
|
} |
|
|
|
} |
|
|
|
id={"listItem" + category.id} |
|
|
|
id={"listItem" + category.id} |
|
|
|
> |
|
|
|
> |
|
|
@ -143,6 +144,7 @@ export default connect( |
|
|
|
selectedVideo: state.publicApi.selectedVideo, |
|
|
|
selectedVideo: state.publicApi.selectedVideo, |
|
|
|
realCategories: state.publicApi.bookInfo?.categories, |
|
|
|
realCategories: state.publicApi.bookInfo?.categories, |
|
|
|
vods: state.publicApi.bookSection?.vods, |
|
|
|
vods: state.publicApi.bookSection?.vods, |
|
|
|
|
|
|
|
userId : state?.user?.status?.id |
|
|
|
}), |
|
|
|
}), |
|
|
|
{ |
|
|
|
{ |
|
|
|
setVideoActive: publicApi.setVideoActive, |
|
|
|
setVideoActive: publicApi.setVideoActive, |
|
|
|