修正多处问题,添加骨架屏
This commit is contained in:
@@ -49,6 +49,7 @@
|
||||
|
||||
<script setup>
|
||||
import { computed } from 'vue'
|
||||
import { getCourseCoverUrl } from '@/utils/request.js'
|
||||
|
||||
const props = defineProps({
|
||||
recommend: {
|
||||
@@ -91,9 +92,14 @@ const courseId = computed(() => props.recommend.groupCourse?.id)
|
||||
// 课程封面图片
|
||||
const courseImage = computed(() => {
|
||||
const coverImage = props.recommend.groupCourse?.coverImage
|
||||
if (!coverImage) return 'https://images.unsplash.com/photo-1534438327276-14e5300c3a48?w=400&q=80'
|
||||
if (coverImage.startsWith('http')) return coverImage
|
||||
return `https://your-domain.com${coverImage}`
|
||||
const url = getCourseCoverUrl(coverImage) || 'https://images.unsplash.com/photo-1534438327276-14e5300c3a48?w=400&q=80'
|
||||
console.log('[RecommendCourseCard] 封面URL:', {
|
||||
'courseName': props.recommend.groupCourse?.courseName,
|
||||
'原始coverImage': coverImage,
|
||||
'转换后URL': url,
|
||||
'是否完整URL': url && url.startsWith('http')
|
||||
})
|
||||
return url
|
||||
})
|
||||
|
||||
// 课程标签文本
|
||||
|
||||
Reference in New Issue
Block a user