hookehuyr

fix(CourseDetailPage): 修复讲师列表和课程介绍的条件渲染

为讲师列表和课程介绍区块添加v-if条件渲染,避免数据为空时显示空区块
为讲师列表项添加底部间距,改善视觉效果
......@@ -28,7 +28,7 @@
<!-- Course Main Content -->
<div class="px-4">
<!-- Course Details -->
<FrostedGlass class="mb-4 p-4 rounded-xl">
<FrostedGlass class="mb-4 p-4 rounded-xl" v-if="course?.introduce">
<h3 class="text-lg font-bold text-gray-800 mb-3">本课程介绍</h3>
<p v-html="course?.introduce" class="text-gray-700 whitespace-pre-line"></p>
</FrostedGlass>
......@@ -91,9 +91,9 @@
</FrostedGlass>
<!-- lecturers Introduction -->
<FrostedGlass class="mb-6 p-4 rounded-xl">
<FrostedGlass class="mb-6 p-4 rounded-xl" v-if="lecturers.length">
<h3 class="text-lg font-bold text-gray-800 mb-3">主讲老师</h3>
<div v-for="(item, index) in lecturers" :key="index" class="flex items-center">
<div v-for="(item, index) in lecturers" :key="index" class="flex items-center" style="margin-bottom: 1rem;">
<div class="w-16 h-16 rounded-full overflow-hidden mr-4">
<img :src="item?.photo || 'https://cdn.ipadbiz.cn/mlaj/images/default_block.png'" alt="lecturer"
class="w-full h-full object-cover" @error="handleImageError" />
......