|
|
@@ -81,7 +81,7 @@
|
|
|
<view class="c_downs">
|
|
|
<view class="lefts">
|
|
|
<image class="lefet_img" :src="$method.splitImgHost(item.coverUrl, true)" mode=""></image>
|
|
|
- <!-- <view class="live_icon">直播</view> -->
|
|
|
+ <view v-if="item.goodsType == 6" class="live_icon">直播</view>
|
|
|
</view>
|
|
|
<view class="rights">
|
|
|
<template
|
|
|
@@ -486,9 +486,10 @@ export default {
|
|
|
onLoad() {
|
|
|
// 1668873600 ,2022.11.20的时间戳
|
|
|
this.leftDays = 1668873600 - parseInt(curTime/1000)
|
|
|
- this.getCourseLiveQues()
|
|
|
+ // this.getCourseLiveQues()
|
|
|
},
|
|
|
async onShow() {
|
|
|
+ this.getCourseLiveQues()
|
|
|
await this.commonSystemTime()
|
|
|
this.sysTime = +this.$method.timest()
|
|
|
},
|
|
|
@@ -590,8 +591,41 @@ export default {
|
|
|
url:`../../pages/webview/index?url=`+encode
|
|
|
})
|
|
|
},
|
|
|
+ toLive(item) {
|
|
|
+ this.$api.courseCourseList({
|
|
|
+ pageNum: 1,
|
|
|
+ pageSize: 1,
|
|
|
+ goodsId: item.goodsId,
|
|
|
+ gradeId: 0,
|
|
|
+ orderGoodsId: item.orderGoodsId,
|
|
|
+ }).then(res => {
|
|
|
+ if (res.data.code == 200) {
|
|
|
+ if(res.data.total > 1) {
|
|
|
+ uni.navigateTo({
|
|
|
+ url:'/pages5/liveDetail/course?orderGoodsId='+item.orderGoodsId+'&goodsId='+item.goodsId+'&gradeId=0'
|
|
|
+ })
|
|
|
+ } else if(res.data.total == 1) {
|
|
|
+ uni.navigateTo({
|
|
|
+ url:'/pages3/live/detail?orderGoodsId='+item.orderGoodsId+'&goodsId='+item.goodsId+'&gradeId=0&courseId='+ res.data.rows[0].courseId
|
|
|
+ })
|
|
|
+ } else {
|
|
|
+ uni.showToast({
|
|
|
+ icon:'none',
|
|
|
+ title:'暂无可观看的直播课程'
|
|
|
+ })
|
|
|
+ }
|
|
|
+
|
|
|
+ }
|
|
|
+ })
|
|
|
+ },
|
|
|
async studyIn(v, i, item, index) {
|
|
|
- console.log('item', item)
|
|
|
+ // console.log('item', item)
|
|
|
+ if (item.goodsType == 6) { // 进入直播课
|
|
|
+ this.toLive(item)
|
|
|
+ return
|
|
|
+ }
|
|
|
+
|
|
|
+ // 进入视频课
|
|
|
this.activeItem = item
|
|
|
if (item.interfaceAccountId > 0) { //学习账号已开通
|
|
|
|
|
|
@@ -696,8 +730,7 @@ export default {
|
|
|
duration: 3000
|
|
|
})
|
|
|
} else if (res.data.code == 500) { //可以学习
|
|
|
-
|
|
|
- if (item.courseNum == 1) { // 课程数量
|
|
|
+ // if (item.courseNum == 1) { // 课程数量
|
|
|
// /course/courseList查询商品下的课程列表
|
|
|
this.$api.courseCourseList({
|
|
|
pageNum: 1,
|
|
|
@@ -707,16 +740,26 @@ export default {
|
|
|
orderGoodsId: item.orderGoodsId,
|
|
|
}).then(res => {
|
|
|
if (res.data.code == 200) {
|
|
|
- uni.navigateTo({
|
|
|
+
|
|
|
+ if(res.data.total > 1) {
|
|
|
+ this.$navTo.togo(`/pages2/wd/course?id=${v}&gid=${i}&orderGoodsId=${item.orderGoodsId}`);
|
|
|
+ } else if(res.data.total == 1) {
|
|
|
+ uni.navigateTo({
|
|
|
url: `/pages3/polyv/detail?id=${res.data.rows[0].courseId}&goodsId=${item.goodsId}&orderGoodsId=${item.orderGoodsId}`
|
|
|
})
|
|
|
-
|
|
|
+ } else {
|
|
|
+ uni.showToast({
|
|
|
+ icon:'none',
|
|
|
+ title:'暂无可观看的视频课程'
|
|
|
+ })
|
|
|
+ }
|
|
|
+
|
|
|
}
|
|
|
});
|
|
|
return;
|
|
|
- }
|
|
|
+ // }
|
|
|
|
|
|
- this.$navTo.togo(`/pages2/wd/course?id=${v}&gid=${i}&orderGoodsId=${item.orderGoodsId}`);
|
|
|
+ // this.$navTo.togo(`/pages2/wd/course?id=${v}&gid=${i}&orderGoodsId=${item.orderGoodsId}`);
|
|
|
}
|
|
|
})
|
|
|
|