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