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

View File

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