修复:内测问题修改

This commit is contained in:
2025-12-03 14:10:27 +08:00
parent 35e27753b8
commit 677fe7436e
19 changed files with 172 additions and 163 deletions

View File

@@ -122,14 +122,6 @@ const loadChapterDetail = async () => {
}
}
/**
* 选择视频
*/
const selectVideo = async (index: number) => {
if (index === currentVideoIndex.value) return
currentVideoIndex.value = index
}
/**
* 预览图片
*/

View File

@@ -122,7 +122,7 @@
</view>
<!-- 锁定图标 -->
<view v-if="!canAccess(chapter)" class="lock-icon">
<view v-if="!canAccess(chapter) && currentCatalogue.type != 0" class="lock-icon">
<wd-icon name="lock-on" size="24px" color="#258feb" />
</view>
</view>
@@ -252,7 +252,7 @@ const canAccess = (chapter: IChapter): boolean => {
if (chapter.isAudition === 1) return true
// 免费课程可以访问
if (currentCatalogue.value.type === 0) return true
// if (currentCatalogue.value.type === 0) return true
return false
}
@@ -261,18 +261,18 @@ const canAccess = (chapter: IChapter): boolean => {
* 点击章节
*/
const handleChapterClick = (chapter: IChapter, catalogue: ICatalogue) => {
if (!isPurchased.value && currentCatalogue.value.type === 0) {
uni.showToast({
title: '请先领取课程',
icon: 'none'
})
return
}
if (!canAccess(chapter)) {
uni.showToast({
title: '请先购买课程',
icon: 'none'
})
if (currentCatalogue.value.type === 0) {
uni.showToast({
title: '请先领取课程',
icon: 'none'
})
} else {
uni.showToast({
title: '请先购买课程',
icon: 'none'
})
}
return
}