|
|
@@ -306,6 +306,10 @@ export const VideoSelectContent: React.FC<VideoSelectContentProps> = ({
|
|
|
}
|
|
|
|
|
|
const handleCollectVideo = async (videoId: number) => {
|
|
|
+ if (videoLibraryType === VideoLibraryType.我的上传) {
|
|
|
+ message.error('上传视频不能收藏');
|
|
|
+ return;
|
|
|
+ }
|
|
|
const video = videoList.find(v => v.videoId === videoId);
|
|
|
if (video) {
|
|
|
const isCollected = video.collect === CollectedStatusEnum.已收藏 ? true : false;
|
|
|
@@ -531,7 +535,7 @@ export const VideoSelectContent: React.FC<VideoSelectContentProps> = ({
|
|
|
<div className="flex flex-col items-center gap-2">
|
|
|
{
|
|
|
video.collect ? (
|
|
|
- <Flex gap={4} onClick={(e) => { e.stopPropagation(); handleCollectVideo(video.videoId); }}>
|
|
|
+ <Flex gap={4} onClick={(e) => { e.stopPropagation(); handleCollectVideo(video.videoId); }}>
|
|
|
<StarFilled className="text-xl !text-[#1890ff]" />
|
|
|
<Text>收藏</Text>
|
|
|
</Flex>
|