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

View File

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