课程学习页面添加

This commit is contained in:
@fawn-nine
2024-06-18 09:02:24 +08:00
parent ee2bc0c320
commit b930cfc084
3 changed files with 1506 additions and 25 deletions

View File

@@ -306,7 +306,15 @@
"path" : "pages/course/learn",
"style" :
{
"navigationBarTitleText" : "课程学习",
"navigationBarTitleText" : "视频/音频学习播放",
"enablePullDownRefresh": true
}
},
{
"path" : "pages/course/myCourseLearn",
"style" :
{
"navigationBarTitleText" : "课程学习页面",
"enablePullDownRefresh": true
}
}

View File

@@ -8,8 +8,25 @@
<image v-else :src="course.image" mode="widthFix"></image>
</view>
<view class="containerBg1">
<view class="courseTitle" v-if="course.id">
<text class="title">{{course.title}}</text>
<!-- <view class="vipSee"> -->
<view class="vipSee" v-if="userInfo.vip != 0">
<text>VIP畅学权益生效中</text>
</view>
<view class="courseTitle flexbox" v-if="course.id">
<view class="" v-if="userInfo.vip != 0">
<view class="" style="width: calc(100% - 170rpx);">
<text class="title">{{course.title}}</text>
</view>
<view class="learnBtn" >
<view>继续学习</view>
</view>
</view>
<view class="" v-else>
<view class="" >
<text class="title">{{course.title}}</text>
</view>
</view>
</view>
<view class="containerBg" v-if="course.content && course.content != ''">
<view class="prof">
@@ -22,8 +39,8 @@
<view class="coursePart flexbox" v-if="librayList.length > 1">
<view :class="['item','flexbox',curId == item.id? 'active': '' ]" v-for="(item, index) in librayList"
:key="index" @click="clicklib(item,index)">
<u-icon v-if="item.isBuy == 0 && curId == item.id" name="lock" color="#258feb" size="28"></u-icon>
<u-icon v-if="item.isBuy == 0 && curId != item.id" name="lock" color="#fff" size="28"></u-icon>
<!-- <u-icon v-if="item.isBuy == 0 && curId == item.id" name="lock" color="#258feb" size="28"></u-icon> -->
<!-- <u-icon v-if="item.isBuy == 0 && curId != item.id" name="lock" color="#fff" size="28"></u-icon> -->
<view class="">{{item.title}}</view>
</view>
</view>
@@ -31,7 +48,15 @@
<!-- 目录是否已经购买 -->
<!-- 0:普通 1超级 2医学 3国学 -->
<view class="endBox" v-if="librayList[curIndex].isBuy == 1 && userMsg.vip == '0'">
您的课程观看有效期截止到2025-06-14 00:00
<view class="" >
<view class="flexbox" v-if="librayList[curIndex].startTime == null">
<text >当前目录还未开始学习</text><uni-tag type="warning" text="去学习" @click="goToLearn()"></uni-tag>
</view>
<view class="flexbox" v-else>
<text >课程观看有效期截止到{{librayList[curIndex].endTime}} </text><uni-tag type="primary" @click="goToLearn()" text="继续学习"></uni-tag>
</view>
</view>
</view>
<view class="item" v-for="(item, index) in courseList" :key="index" @click="chooseChapter(item, index)">
<text>{{item.title}}</text>
@@ -76,7 +101,7 @@
查看更多 >>
</template> -->
<!-- </uni-section> -->
<view class="linkPro">
<view class="linkPro" v-if="tjProList.length > 0">
<uni-section class="mb-10 graybg" title="相关书籍" type="line">
<!-- <template v-slot:right>
<span class="more" @click="pageJupm()">查看更多 >></span>
@@ -729,20 +754,11 @@
console.log('insert image success')
}
})
if (i.emotioni == '[em_98]') {
//匹配最后一个表情符号并删除11。
// this.formData.content = this.formData.content.replace(/(\[[^\]]+\]|[\s\S])$/, '');
// if (this.emoji.length > 0) {
// this.emoji = this.emoji.slice(0, -1)
// }
} else {
// this.emoji.push({
// 'tag': i.emotion,
// 'name': i.emotioni
// })
// this.formData.content += i.emotioni;
}
// if (i.emotioni == '[em_98]') {
// } else {
// }
},
chooseImg() {
this.showImgType = true
@@ -784,7 +800,7 @@
}).exec()
// #endif
},
// end
// end
addSay(fIndex,item) {
this.sayVisible = true
if(item){
@@ -796,7 +812,12 @@
sayclose() {
this.sayVisible = false
this.fatherSay = {}
},
},
goToLearn(){
uni.navigateTo({
url: `/pages/course/myCourseLearn?id=${this.course.id}`
})
},
getData(id) {
$http.request({
url: "sociology/course/getCourseDetail",
@@ -1018,6 +1039,7 @@
// color: #fff;
font-size: 26rpx; margin: 20rpx 0;
padding: 10rpx 20rpx;
.flexbox{justify-content: space-between;}
}
::v-deep .contentBox {
.ql-editor {
@@ -1190,6 +1212,9 @@
}
}
.vipSee{ @include theme("btn_bg"); color: #fff; padding: 20rpx;}
.leve {
margin-bottom: 20rpx;
@@ -1602,14 +1627,14 @@
margin-bottom: 20rpx;
}
.courseTitle {
.courseTitle { justify-content: space-between;
overflow: hidden;
background-image: url(@/static/bg1.jpg);
background-size: cover;
background-repeat: no-repeat;
// background-image: linear-gradient(180deg, #cfe0ff 0%, #fff 50%);
padding: 0 20rpx;
.learnBtn{margin-bottom: 20rpx;width: 150rpx; ;text-align: center; border: 1px solid $themeColor; color: $themeColor; line-height:60rpx; height: 60rpx; font-size: 28rpx; margin-top: 40rpx;}
.price {
color: #ff582e;
font-size: 32rpx;

File diff suppressed because it is too large Load Diff