|
@@ -1,52 +1,28 @@
|
|
|
<template>
|
|
|
- <view
|
|
|
- style="display: flex; justify-content: space-between; align-items: center"
|
|
|
- @click="getVideo"
|
|
|
- >
|
|
|
- <view
|
|
|
- style="
|
|
|
+ <view style="display: flex; justify-content: space-between; align-items: center" @click="getVideo">
|
|
|
+ <view style="
|
|
|
display: flex;
|
|
|
justify-content: space-between;
|
|
|
align-items: center;
|
|
|
margin: 20rpx 0;
|
|
|
width: 100%;
|
|
|
- "
|
|
|
- >
|
|
|
+ ">
|
|
|
<view style="display: flex; align-items: center; flex: 1">
|
|
|
<view class="tag tagColor1" v-if="menuItem.sectionType == 1">视频</view>
|
|
|
<view class="tag tagColor2" v-if="menuItem.sectionType == 2">直播</view>
|
|
|
<view class="tag tagColor3" v-if="menuItem.sectionType == 3">回放</view>
|
|
|
<view class="t_content">
|
|
|
- <view
|
|
|
- v-if="menuItem.sectionType == 1"
|
|
|
- :class="
|
|
|
- playSectionId == newId && playNextId == playId ? 'color1' : ''
|
|
|
- "
|
|
|
- >{{ menuItem.name || "" }}</view
|
|
|
- >
|
|
|
- <view
|
|
|
- v-if="menuItem.sectionType == 2"
|
|
|
- :class="
|
|
|
- playSectionId == newId && playNextId == playId ? 'color2' : ''
|
|
|
- "
|
|
|
- >{{ menuItem.name || "" }}</view
|
|
|
- >
|
|
|
- <view
|
|
|
- v-if="menuItem.sectionType == 3"
|
|
|
- :class="
|
|
|
- playSectionId == newId && playNextId == playId ? 'color3' : ''
|
|
|
- "
|
|
|
- >{{ menuItem.name || "" }}</view
|
|
|
- >
|
|
|
- <view
|
|
|
- style="font-size: 20rpx; color: #ff3b30"
|
|
|
- v-if="menuItem.sectionType == 2 && menuItem.liveStartTime"
|
|
|
- >
|
|
|
+ <view v-if="menuItem.sectionType == 1" :class="playSectionId == newId && playNextId == playId ? 'color1' : ''
|
|
|
+ ">{{ menuItem.name || "" }}</view>
|
|
|
+ <view v-if="menuItem.sectionType == 2" :class="playSectionId == newId && playNextId == playId ? 'color2' : ''
|
|
|
+ ">{{ menuItem.name || "" }}</view>
|
|
|
+ <view v-if="menuItem.sectionType == 3" :class="playSectionId == newId && playNextId == playId ? 'color3' : ''
|
|
|
+ ">{{ menuItem.name || "" }}</view>
|
|
|
+ <view style="font-size: 20rpx; color: #ff3b30" v-if="menuItem.sectionType == 2 && menuItem.liveStartTime">
|
|
|
<view v-if="menuItem.liveStartTime > nowTime || !isBuy">
|
|
|
<text>{{
|
|
|
$method.timestampToTime(menuItem.liveStartTime, (isDay = false))
|
|
|
- }}</text
|
|
|
- >-
|
|
|
+ }}</text>-
|
|
|
<text>{{
|
|
|
$method.timestampToTime(menuItem.liveEndTime, (isDay = false))
|
|
|
}}</text>
|
|
@@ -66,10 +42,7 @@
|
|
|
<text>回放</text>
|
|
|
</view> -->
|
|
|
</view>
|
|
|
- <view
|
|
|
- style="font-size: 20rpx; color: #ff3b30"
|
|
|
- v-if="menuItem.sectionType == 3"
|
|
|
- >
|
|
|
+ <view style="font-size: 20rpx; color: #ff3b30" v-if="menuItem.sectionType == 3">
|
|
|
<view v-if="!menuItem.recordingUrl">
|
|
|
<text>当前直播回放视频请稍后再查看</text>
|
|
|
</view>
|
|
@@ -80,31 +53,18 @@
|
|
|
menuItem.name || ""
|
|
|
}}</view>
|
|
|
<!-- 学习中 -->
|
|
|
- <view
|
|
|
- v-if="playSectionId == newId && playNextId == playId"
|
|
|
- class="learnings"
|
|
|
- >
|
|
|
- <image
|
|
|
- src="/pages3/static/imgs/learning_icon.gif"
|
|
|
- class="learning_icon"
|
|
|
- ></image>
|
|
|
+ <view v-if="playSectionId == newId && playNextId == playId" class="learnings">
|
|
|
+ <image src="/pages3/static/imgs/learning_icon.gif" class="learning_icon"></image>
|
|
|
</view>
|
|
|
</view>
|
|
|
- <view
|
|
|
- style="font-size: 20rpx; color: #ff3b30"
|
|
|
- v-if="menuItem.liveStartTime && menuItem.sectionType != 3 && isBuy"
|
|
|
- >
|
|
|
+ <view style="font-size: 20rpx; color: #ff3b30" v-if="menuItem.liveStartTime && menuItem.sectionType != 3 && isBuy">
|
|
|
<template v-if="!isLast() && !isLive">
|
|
|
<view class="tagWillPlay" v-if="menuItem.liveStartTime > nowTime">
|
|
|
<text>待开播</text>
|
|
|
</view>
|
|
|
- <view
|
|
|
- class="tagPlaying"
|
|
|
- v-if="
|
|
|
- menuItem.liveStartTime <= nowTime &&
|
|
|
- menuItem.liveEndTime > nowTime
|
|
|
- "
|
|
|
- >
|
|
|
+ <view class="tagPlaying" v-if="menuItem.liveStartTime <= nowTime &&
|
|
|
+ menuItem.liveEndTime > nowTime
|
|
|
+ ">
|
|
|
<text>直播中</text>
|
|
|
</view>
|
|
|
<view class="tagPlayed" v-if="menuItem.liveEndTime < nowTime">
|
|
@@ -114,19 +74,13 @@
|
|
|
</view>
|
|
|
<!-- 直播课程没有学习状态 -->
|
|
|
<template v-if="!isLive">
|
|
|
- <view v-if="isRebuild || menuItem.rebuild > 0" class="tagRe"
|
|
|
- >待重修</view
|
|
|
- >
|
|
|
+ <view v-if="isRebuild || menuItem.rebuild > 0" class="tagRe">待重修</view>
|
|
|
<view v-else>
|
|
|
<view v-if="menuItem.learning == 1" class="tagGreen">已学完</view>
|
|
|
</view>
|
|
|
</template>
|
|
|
|
|
|
- <view
|
|
|
- v-if="checkTest()"
|
|
|
- class="exercises"
|
|
|
- @click.stop="toDoSectionExam()"
|
|
|
- >
|
|
|
+ <view v-if="checkTest()" class="exercises" @click.stop="toDoSectionExam()">
|
|
|
<text class="exe_w">习题</text>
|
|
|
<u-icon name="arrow-right" color="#498AFE" size="28"></u-icon>
|
|
|
</view>
|
|
@@ -222,7 +176,7 @@ export default {
|
|
|
// newMenuAllList: [],
|
|
|
};
|
|
|
},
|
|
|
- onLoad() {},
|
|
|
+ onLoad() { },
|
|
|
created() {
|
|
|
if (this.testType == 3) {
|
|
|
// 模块下的所有节试卷列表
|
|
@@ -231,6 +185,7 @@ export default {
|
|
|
chapterId: 0,
|
|
|
courseId: this.courseId,
|
|
|
gradeId: this.gradeId,
|
|
|
+ orderGoodsId: this.orderGoodsId
|
|
|
})
|
|
|
.then((res) => {
|
|
|
if (res.data.code == 200) {
|
|
@@ -249,11 +204,10 @@ export default {
|
|
|
let moduleId = this.menuItem.moduleId || 0;
|
|
|
let chapterId = this.menuItem.chapterId || 0;
|
|
|
let sectionId = this.menuItem.sectionId || this.menuItem.menuId;
|
|
|
- let playNextId = `moduleId${moduleId}chapterId${chapterId}sectionId${sectionId}${
|
|
|
- this.isRebuild ? "isRebuild" : ""
|
|
|
- }`;
|
|
|
+ let playNextId = `moduleId${moduleId}chapterId${chapterId}sectionId${sectionId}${this.isRebuild ? "isRebuild" : ""
|
|
|
+ }`;
|
|
|
this.playId = playNextId;
|
|
|
- if(this.playSectionId == this.newId){
|
|
|
+ if (this.playSectionId == this.newId) {
|
|
|
this.$store.commit("updatePlayNextId", playNextId);
|
|
|
}
|
|
|
uni.$off("playNext" + playNextId); //绑定前先移除之前的事件
|
|
@@ -404,6 +358,7 @@ export default {
|
|
|
courseId: this.courseId,
|
|
|
gradeId: this.gradeId,
|
|
|
goodsId: this.goodsId,
|
|
|
+ orderGoodsId: this.orderGoodsId
|
|
|
})
|
|
|
.then((res) => {
|
|
|
if (res.data.code == 200) {
|
|
@@ -421,6 +376,7 @@ export default {
|
|
|
moduleId: this.menuItem.moduleId || 0,
|
|
|
chapterId: this.menuItem.chapterId || 0,
|
|
|
sectionId: this.menuItem.sectionId || this.menuItem.menuId,
|
|
|
+ orderGoodsId: this.orderGoodsId
|
|
|
})
|
|
|
.then((res) => {
|
|
|
resolve(res.data.data);
|
|
@@ -433,6 +389,7 @@ export default {
|
|
|
.goodsTodayStudySectionNum({
|
|
|
goodsId: this.goodsId,
|
|
|
gradeId: this.gradeId,
|
|
|
+ orderGoodsId: this.orderGoodsId
|
|
|
})
|
|
|
.then((res) => {
|
|
|
if (res.data.code == 200) {
|
|
@@ -554,9 +511,9 @@ export default {
|
|
|
return;
|
|
|
}
|
|
|
/* if(this.playSectionId==this.newId){
|
|
|
- //切换为同一节
|
|
|
- return
|
|
|
- } */
|
|
|
+ //切换为同一节
|
|
|
+ return
|
|
|
+ } */
|
|
|
// 回放
|
|
|
if (this.menuItem.sectionType == 3) {
|
|
|
let moduleId = this.menuItem.moduleId || 0;
|
|
@@ -566,32 +523,32 @@ export default {
|
|
|
// buyCourse 是否购买课程:1是 0否,type=vod是回放
|
|
|
let encode = encodeURIComponent(
|
|
|
this.config.hostLive +
|
|
|
- "/pages/live/index?token=" +
|
|
|
- uni.getStorageSync("token") +
|
|
|
- "&userInfo=" +
|
|
|
- JSON.stringify(this.userInfo) +
|
|
|
- "&channelId=" +
|
|
|
- this.menuItem.liveUrl +
|
|
|
- "&gradeId=" +
|
|
|
- this.gradeId +
|
|
|
- "&courseId=" +
|
|
|
- this.courseId +
|
|
|
- "&goodsId=" +
|
|
|
- this.goodsId +
|
|
|
- "&orderGoodsId=" +
|
|
|
- this.orderGoodsId +
|
|
|
- "§ionId=" +
|
|
|
- sectionId +
|
|
|
- "&chapterId=" +
|
|
|
- chapterId +
|
|
|
- "&moduleId=" +
|
|
|
- moduleId +
|
|
|
- "&buyCourse=1" +
|
|
|
- "&ident=" +
|
|
|
- uuid +
|
|
|
- "§ionType=3" +
|
|
|
- "&vid=" +
|
|
|
- this.menuItem.recordingUrl
|
|
|
+ "/pages/live/index?token=" +
|
|
|
+ uni.getStorageSync("token") +
|
|
|
+ "&userInfo=" +
|
|
|
+ JSON.stringify(this.userInfo) +
|
|
|
+ "&channelId=" +
|
|
|
+ this.menuItem.liveUrl +
|
|
|
+ "&gradeId=" +
|
|
|
+ this.gradeId +
|
|
|
+ "&courseId=" +
|
|
|
+ this.courseId +
|
|
|
+ "&goodsId=" +
|
|
|
+ this.goodsId +
|
|
|
+ "&orderGoodsId=" +
|
|
|
+ this.orderGoodsId +
|
|
|
+ "§ionId=" +
|
|
|
+ sectionId +
|
|
|
+ "&chapterId=" +
|
|
|
+ chapterId +
|
|
|
+ "&moduleId=" +
|
|
|
+ moduleId +
|
|
|
+ "&buyCourse=1" +
|
|
|
+ "&ident=" +
|
|
|
+ uuid +
|
|
|
+ "§ionType=3" +
|
|
|
+ "&vid=" +
|
|
|
+ this.menuItem.recordingUrl
|
|
|
);
|
|
|
uni.navigateTo({
|
|
|
url: `../../pages/webview/index?url=` + encode,
|
|
@@ -693,30 +650,30 @@ export default {
|
|
|
// buyCourse 是否购买课程:1是 0否
|
|
|
let encode = encodeURIComponent(
|
|
|
this.config.hostLive +
|
|
|
- "/pages/live/index?token=" +
|
|
|
- uni.getStorageSync("token") +
|
|
|
- "&userInfo=" +
|
|
|
- JSON.stringify(this.userInfo) +
|
|
|
- "&channelId=" +
|
|
|
- this.menuItem.liveUrl +
|
|
|
- "&gradeId=" +
|
|
|
- this.gradeId +
|
|
|
- "&courseId=" +
|
|
|
- this.courseId +
|
|
|
- "&goodsId=" +
|
|
|
- this.goodsId +
|
|
|
- "&orderGoodsId=" +
|
|
|
- this.orderGoodsId +
|
|
|
- "§ionId=" +
|
|
|
- sectionId +
|
|
|
- "&chapterId=" +
|
|
|
- chapterId +
|
|
|
- "&moduleId=" +
|
|
|
- moduleId +
|
|
|
- "&buyCourse=1" +
|
|
|
- "&ident=" +
|
|
|
- uuid +
|
|
|
- "§ionType=2"
|
|
|
+ "/pages/live/index?token=" +
|
|
|
+ uni.getStorageSync("token") +
|
|
|
+ "&userInfo=" +
|
|
|
+ JSON.stringify(this.userInfo) +
|
|
|
+ "&channelId=" +
|
|
|
+ this.menuItem.liveUrl +
|
|
|
+ "&gradeId=" +
|
|
|
+ this.gradeId +
|
|
|
+ "&courseId=" +
|
|
|
+ this.courseId +
|
|
|
+ "&goodsId=" +
|
|
|
+ this.goodsId +
|
|
|
+ "&orderGoodsId=" +
|
|
|
+ this.orderGoodsId +
|
|
|
+ "§ionId=" +
|
|
|
+ sectionId +
|
|
|
+ "&chapterId=" +
|
|
|
+ chapterId +
|
|
|
+ "&moduleId=" +
|
|
|
+ moduleId +
|
|
|
+ "&buyCourse=1" +
|
|
|
+ "&ident=" +
|
|
|
+ uuid +
|
|
|
+ "§ionType=2"
|
|
|
);
|
|
|
uni.navigateTo({
|
|
|
url: `../../pages/webview/index?url=` + encode,
|
|
@@ -750,6 +707,7 @@ export default {
|
|
|
color: #ffffff;
|
|
|
text-align: center;
|
|
|
}
|
|
|
+
|
|
|
.tagWillPlay {
|
|
|
width: 80rpx;
|
|
|
height: 28rpx;
|
|
@@ -759,6 +717,7 @@ export default {
|
|
|
color: #007aff;
|
|
|
text-align: center;
|
|
|
}
|
|
|
+
|
|
|
.tagPlaying {
|
|
|
width: 80rpx;
|
|
|
height: 28rpx;
|
|
@@ -768,6 +727,7 @@ export default {
|
|
|
color: #ff9500;
|
|
|
text-align: center;
|
|
|
}
|
|
|
+
|
|
|
.tagPlayed {
|
|
|
width: 80rpx;
|
|
|
height: 28rpx;
|
|
@@ -777,6 +737,7 @@ export default {
|
|
|
color: #666666;
|
|
|
text-align: center;
|
|
|
}
|
|
|
+
|
|
|
.tagRe {
|
|
|
width: 80rpx;
|
|
|
height: 28rpx;
|
|
@@ -786,6 +747,7 @@ export default {
|
|
|
color: #ffffff;
|
|
|
text-align: center;
|
|
|
}
|
|
|
+
|
|
|
.tryBox {
|
|
|
width: 103rpx;
|
|
|
height: 48rpx;
|
|
@@ -797,61 +759,77 @@ export default {
|
|
|
text-align: center;
|
|
|
border: 1rpx solid #3577e8;
|
|
|
}
|
|
|
+
|
|
|
.icon_up {
|
|
|
width: 24rpx;
|
|
|
height: 24rpx;
|
|
|
}
|
|
|
+
|
|
|
.t_content3 {
|
|
|
color: #007aff;
|
|
|
}
|
|
|
+
|
|
|
.t_content2 {
|
|
|
color: #007aff;
|
|
|
}
|
|
|
+
|
|
|
.t_content1 {
|
|
|
color: #007aff;
|
|
|
}
|
|
|
+
|
|
|
.t_content {
|
|
|
font-size: 30rpx;
|
|
|
margin-left: 10rpx;
|
|
|
color: #666666;
|
|
|
flex: 1;
|
|
|
}
|
|
|
+
|
|
|
.tagColor3 {
|
|
|
border: 2rpx solid #ff9500;
|
|
|
color: #ff9500;
|
|
|
}
|
|
|
+
|
|
|
.tagColor2 {
|
|
|
border: 2rpx solid #ff3b30;
|
|
|
color: #ff3b30;
|
|
|
}
|
|
|
+
|
|
|
.tagColor1 {
|
|
|
border: 2rpx solid #007aff;
|
|
|
color: #007aff;
|
|
|
}
|
|
|
+
|
|
|
.color3 {
|
|
|
color: #ff9500;
|
|
|
}
|
|
|
+
|
|
|
.color2 {
|
|
|
color: #ff3b30;
|
|
|
}
|
|
|
+
|
|
|
.color1 {
|
|
|
color: #007aff;
|
|
|
}
|
|
|
+
|
|
|
.tag {
|
|
|
border-radius: 8rpx;
|
|
|
font-size: 20rpx;
|
|
|
padding: 4rpx 10rpx;
|
|
|
}
|
|
|
+
|
|
|
.exercises {
|
|
|
margin-left: 10rpx;
|
|
|
font-size: 26rpx;
|
|
|
color: #498afe;
|
|
|
- > text {
|
|
|
+
|
|
|
+ >text {
|
|
|
margin-right: 6rpx;
|
|
|
}
|
|
|
}
|
|
|
+
|
|
|
.learnings {
|
|
|
margin-right: 8rpx;
|
|
|
+
|
|
|
.learning_icon {
|
|
|
width: 40rpx;
|
|
|
height: 40rpx;
|