Sfoglia il codice sorgente

fix(课程详情): 修复课程封面图片显示问题

将课程封面从默认图标替换为实际图片,并调整图片尺寸样式
tanshanming 6 mesi fa
parent
commit
0025621491

+ 7 - 2
src/views/courseDetails/components/tab/LessonDetails.vue

@@ -5,7 +5,7 @@
 			<div v-if="section.classHours && section.classHours.length > 0">
 				<div v-for="lesson in section.classHours" :key="lesson.id" class="lesson-row">
 					<div class="lesson-cover">
-						<a-avatar shape="square" :size="48" icon="play-circle" />
+						<img :src="sysConfig.FILE_URL + lesson.coverImageUrl" alt="Video Cover" class="video-cover" />
 					</div>
 					<div class="lesson-info">
 						<div class="lesson-title">{{ lesson.name }}</div>
@@ -48,6 +48,7 @@
 <script setup>
 	import { defineProps, ref, watch } from 'vue'
 	import { EditOutlined, DeleteOutlined } from '@ant-design/icons-vue'
+	import sysConfig from '@/config'
 	const props = defineProps({
 		pagedSections: Array,
 		currentPage: Number,
@@ -64,7 +65,7 @@
 		}
 	)
 
-	// 处理一键催
+	// 处理一键催
 	const handleUrgeSubmit = (lesson) => {
 		emits('urge-submit', lesson)
 	}
@@ -157,4 +158,8 @@
 		padding: 40px 0;
 		text-align: center;
 	}
+	.video-cover {
+		width: 140px;
+		height: 90px;
+	}
 </style>