This commit is contained in:
liuyuan
2025-06-10 17:49:45 +08:00
parent d3ede507f3
commit b465c476b8
21 changed files with 569 additions and 365 deletions

View File

@@ -194,9 +194,12 @@ export default {
watch: {
currentVideoId() {
this.currentVideoIndex = this.videoArray.findIndex(
(e) => e.id == this.currentVideoId
)
(e) => e.id == this.currentVideoId,
);
console.log(
"that.currentVideoIndex at line 3401111111111111:",
this.currentVideoIndex,
);
},
},
methods: {

View File

@@ -4,7 +4,7 @@
<common-anchor-link style="width: 100%" baseHeight="200" ref="commonAnchorLink" :allDataList="allDataList"
titleKey="title" dataListKey="courseList" :titleStyle="{}" :tabStyle="{background: '#fff'}">
<template slot="otherContent" slot-scope="slotProps">
<view v-if="$platform=='android'&&goBuyTitle" class="describe_block">
<view v-if="goBuyTitle" class="describe_block">
<view style=" display: flex; align-items: center;">
<uni-icons type="info" size="20" color="#fff"></uni-icons>
<text>{{goBuyTitle}}</text>
@@ -14,7 +14,7 @@
</button>
</view>
<view :style="$platform=='android'?'padding-top:80rpx;':''">
<view style="padding-top:80rpx;">
<image style="width: 100%" :src="curriculumData.image" mode="widthFix"></image>
</view>
@@ -95,7 +95,7 @@
<view class="catalogueList">
<view class="chapter_content">
<courseDescription :isCondition="true" :dataList="slotProps.dataList"
@hancleClick="gotoDetail" label="title">
@hancleClick="(data, index) => gotoDetail(data, index, slotProps)" label="title">
<template slot="labelSlot" slot-scope="slotProps">
<view :style="`${
slotProps.row.isAudition==1
@@ -485,16 +485,12 @@
})
},
//课程详情
async gotoDetail(v, index) {
async gotoDetail(data, index, slotProps) {
if(this.userVip){
uni.navigateTo({
url: `/pages/curriculum/order/detail?navTitle=${this.options.navTitle}&title=${v.title}&id=${v.id}&conditions=${v.conditions}&detailOid=${v.detailOid}&curriculumImgUrl=${this.curriculumData.image}`,
});
this.goVideo(data);
}else{
if(v.isAudition == 1||this.cateList[this.currentCateIndex].isBuy == 1){
uni.navigateTo({
url: `/pages/curriculum/order/detail?navTitle=${this.options.navTitle}&title=${v.title}&id=${v.id}&conditions=${v.conditions}&detailOid=${v.detailOid}&curriculumImgUrl=${this.curriculumData.image}`,
});
if(data.isAudition == 1||this.cateList[this.currentCateIndex].isBuy == 1){
this.goVideo(data);
}else{
if(this.cateList[this.currentCateIndex].type != 0){
this.$commonJS.showToast("请先购买课程");
@@ -504,6 +500,11 @@
}
}
},
goVideo(v) {
uni.navigateTo({
url: `/pages/curriculum/order/detail?navTitle=${this.options.navTitle}&title=${v.title}&id=${v.id}&conditions=${v.conditions}&detailOid=${v.detailOid}&curriculumImgUrl=${this.curriculumData.image}`,
});
},
//获取章节
async getChapterList(v) {
var list = [];