This commit is contained in:
Rao 2025-03-05 21:01:57 +08:00
parent c4671ffdfe
commit ba343dbadf
2 changed files with 8 additions and 11 deletions

View File

@ -107,10 +107,10 @@ export async function updatePostViewCount(id: string, type: VisitType) {
where: { id: course.id },
data: {
[metaFieldMap[type]]: courseViews._sum.views || 0,
meta: {
...((post?.meta as any) || {}),
[metaFieldMap[type]]: courseViews._sum.views || 0,
},
// meta: {
// ...((post?.meta as any) || {}),
// [metaFieldMap[type]]: courseViews._sum.views || 0,
// },
},
});
}
@ -127,10 +127,10 @@ export async function updatePostViewCount(id: string, type: VisitType) {
where: { id },
data: {
[metaFieldMap[type]]: totalViews._sum.views || 0,
meta: {
...((post?.meta as any) || {}),
[metaFieldMap[type]]: totalViews._sum.views || 0,
},
// meta: {
// ...((post?.meta as any) || {}),
// [metaFieldMap[type]]: totalViews._sum.views || 0,
// },
},
});
}

View File

@ -24,9 +24,6 @@ export const CourseDetailDisplayArea: React.FC = () => {
const navigate = useNavigate();
const { scrollY } = useScroll();
const videoOpacity = useTransform(scrollY, [0, 200], [1, 0.8]);
useEffect(()=>{
console.log(lecture?.meta?.videoUrl)
})
return (
<div className="min-h-screen bg-gray-50">
{/* 固定的视频区域 */}