This commit is contained in:
@fawn-nine
2024-07-03 10:37:05 +08:00

View File

@@ -42,10 +42,7 @@
</template>
</u-alert>
<scroll-view
scroll-y="true"
class="scroll-Y"
>
<scroll-view scroll-y="true" class="scroll-Y">
<!-- <u-sticky bgColor="#fff" >
<view style="height: 80rpx;">精彩试听</view>
</u-sticky
@@ -69,7 +66,11 @@
<view class="flexbox course_title" v-if="course.id">
<text class="courseTitle title">{{ course.title }}</text>
<view class="start_learn_btn PM_font" @click="onPageJump('/pages/course/myCourseLearn',course.id)">进入学习</view>
<view
class="start_learn_btn PM_font"
@click="onPageJump('/pages/course/myCourseLearn', course.id)"
>进入学习</view
>
</view>
<view
class="containerBg"
@@ -82,7 +83,11 @@
type="line"
></uni-section> -->
<view
style="position: relative; display: flex; align-items: center"
style="
position: relative;
display: flex;
align-items: center;
"
@click="isHideCourseInfo = !isHideCourseInfo"
>
<view
@@ -106,33 +111,33 @@
</view>
</view>
</view>
</view>
<view class="containerBg2">
<view class="PM_font shiting">精彩试听</view>
<view class="shiting_content"> <view v-for="(v, i) in librayList" style="margin-bottom:40rpx;" >
<view class="shiting_content">
<view v-for="(v, i) in librayList" style="margin-bottom: 40rpx">
<view class="catalogueTitle chapter_title">
<view class="top">
<view class="line"></view>
<view class="left"
>
<text style="font-weight: blod" class='catalogue_title'>{{ v.title }}</text>
<view class="left">
<text style="font-weight: blod" class="catalogue_title">{{
v.title
}}</text>
<!-- 普通用户或者国学Vip -->
</view>
<view class="not_purchased" v-if="(v.isBuy != 1 && (vip.type == 0 || vip.type == 3))||( v.isBuy == 1 &&
<view
class="not_purchased"
v-if="
(v.isBuy != 1 && (vip.type == 0 || vip.type == 3)) ||
(v.isBuy == 1 &&
(vip.type == 0 || vip.type == 3) &&
v.endTime)">
v.endTime)
"
>
<view class="spot"></view>
<!-- -->
<text
v-if="v.isBuy != 1 && (vip.type == 0 || vip.type == 3)"
>未购买
</text>
@@ -143,15 +148,13 @@
(vip.type == 0 || vip.type == 3) &&
v.endTime
"
>有效期至{{ v.endTime }}
</text> </view>
</text>
</view>
<view class="right">
<!-- -->
<u-icon
v-if="goBuyType != 1 && v.type != 0"
@click="handleClickGetGoodsList(v)"
@@ -160,65 +163,74 @@
color="#FF2B57"
size="30"
style="display: inline-block; margin-left: 10rpx"
></u-icon
></u-icon>
<text
v-if="goBuyType != 1 && v.type == 0 && !v.endTime"
style="color: #fff; font-size: 12px"
class="fdButtonBox aui-text-success"
@click="handleClickGetGoodsList(v)"
>开始学习</text
>
<text v-if="goBuyType != 1&&v.type==0&&!v.endTime" style="color: #fff; font-size: 12px;" class="fdButtonBox aui-text-success" @click="handleClickGetGoodsList(v)">开始学习</text>
</view>
</view>
<!-- -->
</view>
<view class="chapter_content">
<view
@click.stop="item.isAudition == 1 ? gotoDetail(item, i) : ''"
v-if="courseList[i].length > 0"
class="item"
v-for="(item, index) in courseList[i]"
:key="index"
>
<view class="item_videoList">
<view
class="item_videoList"
style="
display: flex;
width: calc(100%);
align-items: center;
"
>
<view style="display: flex;width: calc(100% - 140rpx); align-items: center">
<text
class="hidden1"
style="display: inline-block;color: #1E2F3E; width: calc(100% - 100rpx);font-weight: bold;"
style="
display: inline-block;
color: #1e2f3e;
width: calc(100% - 100rpx);
font-weight: bold;
"
>{{ item.title }}</text
>
<!-- <uni-tag
<uni-tag
v-if="item.isAudition == 1"
style="margin-left: 10rpx"
:inverted="true"
text="试听"
size="mini"
type="primary"
/> -->
/>
</view>
<text style="color: #b0b0b0; font-size: 24rpx"
<!-- <text style="color: #b0b0b0; font-size: 24rpx"
>【共{{ item.videoList.length }}课时】</text
>
> -->
</view>
<!--
<view class="videoList">
<view class="video_item" @click.stop="gotoDetail(item, videoIndex)" v-for="(video,videoIndex) in item.videoList">
【{{ video.type == "2" ? "音频" : "视频" }}】{{ getNumber(videoIndex + 1) }}
</view>
</view>
</view> -->
</view>
<view v-else> 暂无文章</view>
</view>
</view></view>
</view></view
>
</view>
<view class="linkPro" v-if="tjProList.length > 0">
@@ -258,7 +270,7 @@
</scroll-view>
</view>
</view>
<view style="background:rgba(255, 255, 255, 0.85) !important;">
<view style="background: rgba(255, 255, 255, 0.85) !important">
<uni-section
style="padding: 0 20rpx"
class="mb-10 graybg"
@@ -266,7 +278,11 @@
type="line"
>
<template v-slot:right>
<view class="flexbox" style="align-items: center" @click="addSay()">
<view
class="flexbox"
style="align-items: center"
@click="addSay()"
>
<u-icon name="edit-pen" color="#2979ff" size="28"></u-icon>
<text>发布留言</text>
</view>
@@ -501,7 +517,6 @@
<uni-popup ref="share" type="share" safeArea backgroundColor="#fff">
<uni-popup-share @select="haveSelected"></uni-popup-share>
</uni-popup>
<z-navigation></z-navigation>
</view>
</template>
@@ -748,12 +763,22 @@ export default {
}
},
//课程详情
async gotoDetail(v, videoIndex) {
async gotoDetail(v, courseIndex) {
console.log("v at line 668:", v);
this.currentCateIndex = courseIndex;
// if (
// this.courseList[this.currentCateIndex].isBuy == 1 ||
// v.isAudition == 1 ||
// this.vip.type != "0"
// ) {
uni.navigateTo({
// url: '../bookShop/commodityDetail?id=' + item.id
url: `/pages/course/chapterDetail?navTitle=${this.pageTitle}&title=${v.title}&id=${v.id}&conditions=${v.conditions}&videoIndex=${videoIndex}`,
url: `/pages/course/chapterDetail?navTitle=${this.pageTitle}&title=${v.title}&id=${v.id}&conditions=${v.conditions}`,
});
// } else {
// this.$commonJS.showToast("请先购买课程");
// }
},
handleClickSelectGoods(data) {
this.selectGoodsData = data;
@@ -1310,12 +1335,12 @@ export default {
var list = await that.getChapterList(that.librayList[i]);
console.log("list at line 1224:", list);
list.map(async (item, index) => {
console.log("item at line 1239:", item);
item.videoList = [];
var data = await that.getPath(item);
item.videoList = [...data];
});
// list.map(async (item, index) => {
// console.log("item at line 1239:", item);
// item.videoList = [];
// var data = await that.getPath(item);
// item.videoList = [...data];
// });
console.log("list at line 1222:", list);
that.courseList[i] = [...list];
@@ -1453,9 +1478,7 @@ export default {
// item.tryListen = [];
// });
list = JSON.parse(
JSON.stringify(res.chapterList.filter((e) => e.isAudition == 1))
);
list = res.chapterList;
console.log("at line 1343:", list);
// console.log('status', res)
@@ -1684,7 +1707,6 @@ export default {
//
.liuyanBox {
padding: 0 20rpx;
margin-top: 20rpx;
@@ -2125,8 +2147,6 @@ export default {
// padding: 0 20rpx;
font-size: 40rpx;
.learnBtn {
margin-bottom: 20rpx;
width: 150rpx;
@@ -2174,7 +2194,9 @@ export default {
}
}
}
.curseSet{margin-right: 10px;}
.curseSet {
margin-right: 10px;
}
.shitingLIst {
background-color: #fff;
padding: 20rpx;
@@ -2244,7 +2266,6 @@ export default {
// padding-bottom: 10rpx !important;
}
.chapter_title {
width: 100%;
font-size: 28rpx;
@@ -2275,14 +2296,14 @@ export default {
position: absolute;
right: -4rpx;
border-radius: 8rpx;
background-color: #33435D;
background-color: #33435d;
bottom: -4rpx;
}
color: #33435D;
color: #33435d;
margin-left: 20rpx;
font-size: 24rpx;
padding: 0 20rpx;
border-bottom: 2rpx dotted #33435D;
border-bottom: 2rpx dotted #33435d;
text {
margin: 0 10rpx;
letter-spacing: 1rpx;
@@ -2388,17 +2409,15 @@ export default {
margin-bottom: 10rpx;
// padding:20rpx;
.course_info {
box-shadow: 0 2px 12px 0 rgba(0,0,0,.1);
background:#F2F8FF;
box-shadow: 0 2px 12px 0 rgba(0, 0, 0, 0.1);
background: #f2f8ff;
// border-radius:20rpx;
overflow: hidden;
}
}
.catalogue_title {
background: linear-gradient(130deg,#162A4F 0%, #1E4C7D 100%);
background: linear-gradient(130deg, #162a4f 0%, #1e4c7d 100%);
-webkit-background-clip: text;
-webkit-text-fill-color: transparent;
font-size: 42rpx;
@@ -2413,18 +2432,17 @@ margin-bottom:10rpx;
// height:70rpx;
// display:inline-block;
// padding:10rpx 20rpx;
}
.chapter_content {
padding: 20rpx;
// padding-top:60rpx;
margin-top: 40rpx;
border:4rpx solid #FFFFFC;
background-image: linear-gradient(52deg, #E8F6FF 0%, #E3F2FE 50%);
border: 4rpx solid #fffffc;
background-image: linear-gradient(52deg, #e8f6ff 0%, #e3f2fe 50%);
// background-image: linear-gradient(-180deg, #8BBDFE 0%, #B4DCFF 100%);
// background:rgba(255, 255, 255, 0.85);
// background:rgba(255, 255, 255, 0.85);
box-shadow: 0px 0px 10px 0px #89C8E9 !important;
box-shadow: 0px 0px 10px 0px #89c8e9 !important;
border-top-right-radius: 40rpx;
border-bottom-left-radius: 40rpx;
.videoList {
@@ -2437,14 +2455,13 @@ margin-bottom:10rpx;
font-size: 22rpx;
margin: 10rpx 0;
background: rgba(255, 255, 255, 0.85);
box-shadow: 0 2px 12px 0 rgba(255,255,255,.1);
box-shadow: 0 2px 12px 0 rgba(255, 255, 255, 0.1);
border-radius: 10rpx;
padding: 10rpx 20rpx;
margin-right: 1%;
color: #333;
letter-spacing: 2rpx;
}
}
}
@@ -2455,17 +2472,17 @@ margin-bottom:10rpx;
border-top-right-radius: 12rpx;
border-bottom-right-radius: 12rpx;
margin-right: 20rpx;
background-image: linear-gradient(108deg, #2786EB 0%, #35A6FF 100%);
background-image: linear-gradient(108deg, #2786eb 0%, #35a6ff 100%);
}
.containerBg2 {
padding-top: 40rpx;
// margin-top: 100rpx;
background: linear-gradient(108deg, #C3E7FF 0%, #59BAFE 100%) !important;
background: linear-gradient(108deg, #c3e7ff 0%, #59bafe 100%) !important;
.shiting {
line-height: 100rpx;
background: linear-gradient(130deg, #4FA1FD 0%, #12F3FF 100%);
background: linear-gradient(130deg, #4fa1fd 0%, #12f3ff 100%);
-webkit-background-clip: text;
-webkit-text-fill-color: transparent;
margin-bottom: 20rpx;
@@ -2483,8 +2500,6 @@ margin-bottom:10rpx;
}
.shiting_content {
padding: 20rpx;
}
}
</style>