fix:隐藏授权文案
This commit is contained in:
parent
071b19e42e
commit
68b95b9776
@ -8,8 +8,8 @@
|
||||
</a-button>
|
||||
<div class="course-title">
|
||||
<h2>{{ course.name || '课程包详情' }}</h2>
|
||||
<a-tag v-if="course.authorized" color="success" style="margin-left: 12px;">已授权</a-tag>
|
||||
<a-tag v-else color="warning" style="margin-left: 12px;">未授权</a-tag>
|
||||
<!-- <a-tag v-if="course.authorized" color="success" style="margin-left: 12px;">已授权</a-tag>
|
||||
<a-tag v-else color="warning" style="margin-left: 12px;">未授权</a-tag> -->
|
||||
</div>
|
||||
</div>
|
||||
<div class="header-actions">
|
||||
@ -211,12 +211,8 @@
|
||||
</div>
|
||||
<div class="section-body">
|
||||
<div class="lesson-cards">
|
||||
<div
|
||||
v-for="lesson in courseLessons"
|
||||
:key="lesson.id"
|
||||
class="lesson-card"
|
||||
:class="'lesson-type-' + lesson.lessonType?.toLowerCase()"
|
||||
>
|
||||
<div v-for="lesson in courseLessons" :key="lesson.id" class="lesson-card"
|
||||
:class="'lesson-type-' + lesson.lessonType?.toLowerCase()">
|
||||
<div class="lesson-header">
|
||||
<div class="lesson-type-badge" :style="{ background: getLessonTypeBgColor(lesson.lessonType) }">
|
||||
{{ translateLessonType(lesson.lessonType) }}
|
||||
@ -242,29 +238,20 @@
|
||||
<div class="lesson-section" v-if="hasLessonResources(lesson)">
|
||||
<div class="lesson-section-title">核心资源</div>
|
||||
<div class="resource-grid">
|
||||
<div
|
||||
v-if="lesson.videoPath"
|
||||
class="resource-item"
|
||||
@click="previewFile(lesson.videoPath, lesson.videoName || '绘本动画')"
|
||||
>
|
||||
<div v-if="lesson.videoPath" class="resource-item"
|
||||
@click="previewFile(lesson.videoPath, lesson.videoName || '绘本动画')">
|
||||
<VideoCameraOutlined class="resource-icon video" />
|
||||
<span class="resource-name">{{ lesson.videoName || '绘本动画' }}</span>
|
||||
<EyeOutlined class="resource-action" />
|
||||
</div>
|
||||
<div
|
||||
v-if="lesson.pptPath"
|
||||
class="resource-item"
|
||||
@click="previewFile(lesson.pptPath, lesson.pptName || '教学课件')"
|
||||
>
|
||||
<div v-if="lesson.pptPath" class="resource-item"
|
||||
@click="previewFile(lesson.pptPath, lesson.pptName || '教学课件')">
|
||||
<FilePptOutlined class="resource-icon ppt" />
|
||||
<span class="resource-name">{{ lesson.pptName || '教学课件' }}</span>
|
||||
<EyeOutlined class="resource-action" />
|
||||
</div>
|
||||
<div
|
||||
v-if="lesson.pdfPath"
|
||||
class="resource-item"
|
||||
@click="previewFile(lesson.pdfPath, lesson.pdfName || '电子绘本')"
|
||||
>
|
||||
<div v-if="lesson.pdfPath" class="resource-item"
|
||||
@click="previewFile(lesson.pdfPath, lesson.pdfName || '电子绘本')">
|
||||
<FilePdfOutlined class="resource-icon pdf" />
|
||||
<span class="resource-name">{{ lesson.pdfName || '电子绘本' }}</span>
|
||||
<EyeOutlined class="resource-action" />
|
||||
@ -321,12 +308,8 @@
|
||||
<VideoCameraOutlined style="color: #722ed1;" /> 视频资源
|
||||
</div>
|
||||
<div class="resource-list">
|
||||
<div
|
||||
v-for="(item, index) in allVideos"
|
||||
:key="'video-' + index"
|
||||
class="resource-item-card"
|
||||
@click="previewFile(item.path, item.name)"
|
||||
>
|
||||
<div v-for="(item, index) in allVideos" :key="'video-' + index" class="resource-item-card"
|
||||
@click="previewFile(item.path, item.name)">
|
||||
<VideoCameraOutlined class="item-icon" style="color: #722ed1;" />
|
||||
<span class="item-name">{{ item.name }}</span>
|
||||
<PlayCircleOutlined class="item-action" />
|
||||
@ -340,12 +323,8 @@
|
||||
<AudioOutlined style="color: #52c41a;" /> 音频资源
|
||||
</div>
|
||||
<div class="resource-list">
|
||||
<div
|
||||
v-for="(item, index) in allAudios"
|
||||
:key="'audio-' + index"
|
||||
class="resource-item-card"
|
||||
@click="previewFile(item.path, item.name)"
|
||||
>
|
||||
<div v-for="(item, index) in allAudios" :key="'audio-' + index" class="resource-item-card"
|
||||
@click="previewFile(item.path, item.name)">
|
||||
<AudioOutlined class="item-icon" style="color: #52c41a;" />
|
||||
<span class="item-name">{{ item.name }}</span>
|
||||
<PlayCircleOutlined class="item-action" />
|
||||
@ -359,12 +338,8 @@
|
||||
<FileTextOutlined style="color: #1890ff;" /> 文档资源
|
||||
</div>
|
||||
<div class="resource-list">
|
||||
<div
|
||||
v-for="(item, index) in allDocuments"
|
||||
:key="'doc-' + index"
|
||||
class="resource-item-card"
|
||||
@click="previewFile(item.path, item.name)"
|
||||
>
|
||||
<div v-for="(item, index) in allDocuments" :key="'doc-' + index" class="resource-item-card"
|
||||
@click="previewFile(item.path, item.name)">
|
||||
<FilePdfOutlined v-if="item.type === 'pdf'" class="item-icon" style="color: #f5222d;" />
|
||||
<FilePptOutlined v-else-if="item.type === 'ppt'" class="item-icon" style="color: #fa8c16;" />
|
||||
<FileTextOutlined v-else class="item-icon" style="color: #1890ff;" />
|
||||
@ -380,14 +355,8 @@
|
||||
<PictureOutlined style="color: #13c2c2;" /> 图片资源
|
||||
</div>
|
||||
<div class="image-grid">
|
||||
<img
|
||||
v-for="(item, index) in allImages"
|
||||
:key="'img-' + index"
|
||||
:src="getFileUrl(item.path)"
|
||||
:alt="item.name"
|
||||
class="image-thumbnail"
|
||||
@click="previewImage(getFileUrl(item.path))"
|
||||
/>
|
||||
<img v-for="(item, index) in allImages" :key="'img-' + index" :src="getFileUrl(item.path)"
|
||||
:alt="item.name" class="image-thumbnail" @click="previewImage(getFileUrl(item.path))" />
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
@ -424,11 +393,7 @@
|
||||
</a-modal>
|
||||
|
||||
<!-- 文件预览弹窗 -->
|
||||
<FilePreviewModal
|
||||
v-model:open="previewModalVisible"
|
||||
:file-url="previewFileUrl"
|
||||
:file-name="previewFileName"
|
||||
/>
|
||||
<FilePreviewModal v-model:open="previewModalVisible" :file-url="previewFileUrl" :file-name="previewFileName" />
|
||||
</div>
|
||||
</template>
|
||||
|
||||
@ -550,9 +515,9 @@ const themeTagStyle = computed(() =>
|
||||
// 是否有课程介绍内容
|
||||
const hasIntroContent = computed(() => {
|
||||
return course.value.introSummary || course.value.introHighlights ||
|
||||
course.value.introGoals || course.value.introSchedule ||
|
||||
course.value.introKeyPoints || course.value.introMethods ||
|
||||
course.value.introEvaluation || course.value.introNotes;
|
||||
course.value.introGoals || course.value.introSchedule ||
|
||||
course.value.introKeyPoints || course.value.introMethods ||
|
||||
course.value.introEvaluation || course.value.introNotes;
|
||||
});
|
||||
|
||||
// 课程介绍填写数量
|
||||
@ -612,7 +577,7 @@ const allVideos = computed(() => {
|
||||
videos.push({ path: item.path, name: item.name || '视频', source: '资源库' });
|
||||
});
|
||||
}
|
||||
} catch {}
|
||||
} catch { }
|
||||
}
|
||||
return videos;
|
||||
});
|
||||
@ -628,7 +593,7 @@ const allAudios = computed(() => {
|
||||
audios.push({ path: item.path, name: item.name || '音频', source: '资源库' });
|
||||
});
|
||||
}
|
||||
} catch {}
|
||||
} catch { }
|
||||
}
|
||||
return audios;
|
||||
});
|
||||
@ -657,7 +622,7 @@ const allDocuments = computed(() => {
|
||||
docs.push({ path: item.path, name: item.name || '电子绘本', type: 'pdf', source: '资源库' });
|
||||
});
|
||||
}
|
||||
} catch {}
|
||||
} catch { }
|
||||
}
|
||||
return docs;
|
||||
});
|
||||
@ -673,16 +638,16 @@ const allImages = computed(() => {
|
||||
images.push({ path: item.path, name: item.name || '挂图' });
|
||||
});
|
||||
}
|
||||
} catch {}
|
||||
} catch { }
|
||||
}
|
||||
return images;
|
||||
});
|
||||
|
||||
const hasAnyResources = computed(() => {
|
||||
return allVideos.value.length > 0 ||
|
||||
allAudios.value.length > 0 ||
|
||||
allDocuments.value.length > 0 ||
|
||||
allImages.value.length > 0;
|
||||
allAudios.value.length > 0 ||
|
||||
allDocuments.value.length > 0 ||
|
||||
allImages.value.length > 0;
|
||||
});
|
||||
|
||||
const totalResourcesCount = computed(() => {
|
||||
@ -1154,9 +1119,17 @@ const fetchCourseDetail = async () => {
|
||||
font-size: 18px;
|
||||
margin-right: 8px;
|
||||
|
||||
&.video { color: #722ed1; }
|
||||
&.ppt { color: #fa8c16; }
|
||||
&.pdf { color: #f5222d; }
|
||||
&.video {
|
||||
color: #722ed1;
|
||||
}
|
||||
|
||||
&.ppt {
|
||||
color: #fa8c16;
|
||||
}
|
||||
|
||||
&.pdf {
|
||||
color: #f5222d;
|
||||
}
|
||||
}
|
||||
|
||||
.resource-name {
|
||||
|
||||
@ -83,7 +83,7 @@
|
||||
<ReadOutlined class="cover-icon" />
|
||||
</div>
|
||||
<img v-else :src="course.pictureUrl" alt="cover" />
|
||||
<div class="auth-badge" :class="course.authorized ? 'authorized' : 'unauthorized'">
|
||||
<div v-if="false" class="auth-badge" :class="course.authorized ? 'authorized' : 'unauthorized'">
|
||||
<CheckCircleOutlined v-if="course.authorized" />
|
||||
<ClockCircleOutlined v-else />
|
||||
{{ course.authorized ? '已授权' : '未授权' }}
|
||||
|
||||
Loading…
Reference in New Issue
Block a user