tijiao
This commit is contained in:
@@ -1,5 +1,4 @@
|
||||
<template>
|
||||
|
||||
<view
|
||||
class="container commonPageBox commonDetailPage"
|
||||
style="height: auto !important"
|
||||
@@ -22,7 +21,7 @@
|
||||
>
|
||||
<template slot="otherContent" slot-scope="slotProps">
|
||||
<view v-if="goBuyTitle" class="describe_block">
|
||||
<view style="display: flex; align-items: center;">
|
||||
<view style="display: flex; align-items: center">
|
||||
<uni-icons type="info" size="20" color="#fff"></uni-icons>
|
||||
<text>{{ goBuyTitle }}</text>
|
||||
</view>
|
||||
@@ -35,10 +34,7 @@
|
||||
</button>
|
||||
</view>
|
||||
|
||||
<view
|
||||
v-if="curriculumData.image"
|
||||
style="padding-top:80rpx;"
|
||||
>
|
||||
<view v-if="curriculumData.image" style="padding-top: 80rpx">
|
||||
<image
|
||||
style="width: 100%"
|
||||
:src="curriculumData.image"
|
||||
@@ -65,7 +61,9 @@
|
||||
<view class="course_info_box">
|
||||
<view class="course_info">
|
||||
<view class="flexbox course_title" v-if="curriculumData.id">
|
||||
<text class="courseTitle title">{{curriculumData.title}}</text>
|
||||
<text class="courseTitle title">{{
|
||||
curriculumData.title
|
||||
}}</text>
|
||||
</view>
|
||||
<view style="color: #b0b0b0; padding: 0 20rpx">
|
||||
{{
|
||||
@@ -79,26 +77,31 @@
|
||||
v-if="curriculumData.content && curriculumData.content != ''"
|
||||
>
|
||||
<view class="prof">
|
||||
<view style="
|
||||
position: relative;
|
||||
display: flex;
|
||||
align-items: center;
|
||||
">
|
||||
<view
|
||||
style="
|
||||
position: relative;
|
||||
display: flex;
|
||||
align-items: center;
|
||||
"
|
||||
>
|
||||
<view
|
||||
:class="`${isHideCourseInfo ? 'hidden2' : ''}`"
|
||||
style="font-size: 30rpx; text-align: justify;"
|
||||
style="font-size: 30rpx; text-align: justify"
|
||||
v-html="curriculumData.content"
|
||||
>
|
||||
</view>
|
||||
<text @click="isHideCourseInfo = !isHideCourseInfo" style="
|
||||
position: absolute;
|
||||
padding: 4rpx ;
|
||||
bottom: -45rpx;
|
||||
right: 0;
|
||||
color: #838588;
|
||||
">
|
||||
{{ isHideCourseInfo ? "展开" : "收起" }}
|
||||
</text>
|
||||
<text
|
||||
@click="isHideCourseInfo = !isHideCourseInfo"
|
||||
style="
|
||||
position: absolute;
|
||||
padding: 4rpx;
|
||||
bottom: -45rpx;
|
||||
right: 0;
|
||||
color: #838588;
|
||||
"
|
||||
>
|
||||
{{ isHideCourseInfo ? "展开" : "收起" }}
|
||||
</text>
|
||||
</view>
|
||||
</view>
|
||||
</view>
|
||||
@@ -112,7 +115,9 @@
|
||||
<view class="top">
|
||||
<view class="line"></view>
|
||||
<view class="left">
|
||||
<text style="font-weight: blod" class="catalogue_title">{{slotProps.data.title }}</text>
|
||||
<text style="font-weight: blod" class="catalogue_title">{{
|
||||
slotProps.data.title
|
||||
}}</text>
|
||||
</view>
|
||||
<view class="not_purchased">
|
||||
<view class="spot"></view>
|
||||
@@ -149,7 +154,11 @@
|
||||
></u-icon>
|
||||
|
||||
<text
|
||||
v-if="slotProps.data.type == 0 && userVip == null"
|
||||
v-if="
|
||||
slotProps.data.type == 0 &&
|
||||
userVip == null &&
|
||||
slotProps.data.isBuy == 0
|
||||
"
|
||||
style="color: #fff; font-size: 12px"
|
||||
class="fdButtonBox aui-text-success"
|
||||
@click="handleClickGetGoodsList(slotProps.data)"
|
||||
@@ -166,11 +175,12 @@
|
||||
<view class="shiting_content">
|
||||
<view class="catalogueList">
|
||||
<view class="chapter_content">
|
||||
|
||||
<courseDescription
|
||||
:isCondition="true"
|
||||
:dataList="slotProps.dataList"
|
||||
@hancleClick="(data,index)=>gotoDetail(data,index,slotProps)"
|
||||
@hancleClick="
|
||||
(data, index) => gotoDetail(data, index, slotProps)
|
||||
"
|
||||
label="title"
|
||||
>
|
||||
<template slot="labelSlot" slot-scope="slotProps1">
|
||||
@@ -199,10 +209,9 @@
|
||||
>试听</text
|
||||
>
|
||||
|
||||
<view class="shitingTag">
|
||||
<view class="shitingTag" v-if="slotProps.data.type != 0">
|
||||
<u-icon
|
||||
v-if="
|
||||
slotProps.data.type != 0 &&
|
||||
slotProps.data.isBuy == 0 &&
|
||||
userVip == null &&
|
||||
slotProps1.row.isAudition == 0
|
||||
@@ -212,6 +221,18 @@
|
||||
size="24"
|
||||
></u-icon>
|
||||
</view>
|
||||
<view class="shitingTag" v-if="slotProps.data.type == 0">
|
||||
<u-icon
|
||||
v-if="
|
||||
userVip == null &&
|
||||
slotProps1.row.isAudition == 0 &&
|
||||
slotProps.data.isBuy == 0
|
||||
"
|
||||
name="lock"
|
||||
color="#258feb"
|
||||
size="24"
|
||||
></u-icon>
|
||||
</view>
|
||||
</template>
|
||||
</courseDescription>
|
||||
</view>
|
||||
@@ -607,6 +628,11 @@ export default {
|
||||
} else {
|
||||
this.getProductListForCourse(v);
|
||||
}
|
||||
this.$nextTick(() => {
|
||||
setTimeout(() => {
|
||||
this.getCourseDescriptionData();
|
||||
}, 500);
|
||||
});
|
||||
},
|
||||
|
||||
getProductListForCourse(v) {
|
||||
@@ -682,23 +708,44 @@ export default {
|
||||
};
|
||||
this.show = true;
|
||||
},
|
||||
goVideo(v) {
|
||||
uni.navigateTo({
|
||||
url: `/pages/curriculum/order/curriculum/detail?navTitle=${this.options.navTitle}&title=${v.title}&id=${v.id}&conditions=${v.conditions}&detailOid=${v.detailOid}&curriculumImgUrl=${this.curriculumData.image}`,
|
||||
});
|
||||
},
|
||||
//课程详情
|
||||
async gotoDetail(v, index,slotProps) {
|
||||
console.log('slotProps at line 686:', slotProps)
|
||||
async gotoDetail(data, index, slotProps) {
|
||||
console.log("v at line 704:", data);
|
||||
console.log("slotProps at line 686:", slotProps);
|
||||
|
||||
console.log('currentCateIndex at line 687:', this.currentCateIndex)
|
||||
this.currentCateIndex=slotProps.index
|
||||
if (
|
||||
this.cateList[this.currentCateIndex].isBuy == 1 ||
|
||||
v.isAudition == 1 ||
|
||||
this.cateList[this.currentCateIndex].type == 0 ||
|
||||
this.userVip != null
|
||||
) {
|
||||
uni.navigateTo({
|
||||
url: `/pages/curriculum/order/curriculum/detail?navTitle=${this.options.navTitle}&title=${v.title}&id=${v.id}&conditions=${v.conditions}&detailOid=${v.detailOid}&curriculumImgUrl=${this.curriculumData.image}`,
|
||||
});
|
||||
this.currentCateIndex = slotProps.index;
|
||||
|
||||
console.log(
|
||||
"currentCateIndex at line 687:",
|
||||
this.cateList[this.currentCateIndex]
|
||||
);
|
||||
|
||||
if (this.userVip != null) {
|
||||
this.goVideo(data);
|
||||
} else {
|
||||
this.$commonJS.showToast("请先购买课程");
|
||||
if (data.isAudition == 1) {
|
||||
this.goVideo(data);
|
||||
} else {
|
||||
if (this.cateList[this.currentCateIndex].type == 0) {
|
||||
//免费课程
|
||||
if (this.cateList[this.currentCateIndex].isBuy == 1) {
|
||||
this.goVideo(data);
|
||||
} else {
|
||||
this.$commonJS.showToast("请先点击开始学习");
|
||||
}
|
||||
} else {
|
||||
if (this.cateList[this.currentCateIndex].isBuy == 1) {
|
||||
this.goVideo(data);
|
||||
} else {
|
||||
this.$commonJS.showToast("请先购买课程");
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
},
|
||||
//相关课程
|
||||
@@ -1157,8 +1204,8 @@ export default {
|
||||
|
||||
// }
|
||||
.hidden2 {
|
||||
line-height: 50rpx;
|
||||
height: 100rpx;
|
||||
line-height: 50rpx;
|
||||
height: 100rpx;
|
||||
}
|
||||
.goods_box {
|
||||
padding: 40rpx 20rpx;
|
||||
@@ -1575,12 +1622,12 @@ export default {
|
||||
padding: 10rpx 0;
|
||||
color: #333;
|
||||
}
|
||||
/deep/ .prof img{
|
||||
width: 100%;
|
||||
/deep/ .prof img {
|
||||
width: 100%;
|
||||
}
|
||||
.containerBg {
|
||||
padding: 0 20rpx;
|
||||
padding-bottom: 40rpx;
|
||||
padding: 0 20rpx;
|
||||
padding-bottom: 40rpx;
|
||||
}
|
||||
|
||||
.containerBg1 {
|
||||
|
||||
Reference in New Issue
Block a user