|
@@ -187,27 +187,51 @@ export default {
|
|
|
return;
|
|
|
}
|
|
|
console.log(item,'item')
|
|
|
- if(item.courseNum == 1 ) {
|
|
|
-
|
|
|
- this.$api.courseCourseList({
|
|
|
- pageNum:1,
|
|
|
- pageSize:1,
|
|
|
- goodsId:item.goodsId,
|
|
|
- gradeId:item.gradeId
|
|
|
- }).then(res => {
|
|
|
- if(res.data.code == 200) {
|
|
|
+ this.$api.courseCourseList({
|
|
|
+ pageNum: 1,
|
|
|
+ pageSize: 1,
|
|
|
+ goodsId: item.goodsId,
|
|
|
+ gradeId: item.gradeId,
|
|
|
+ orderGoodsId: this.orderGoodsId,
|
|
|
+ }).then(res => {
|
|
|
+ if (res.data.code == 200) {
|
|
|
+
|
|
|
+ if(res.data.total > 1) {
|
|
|
+ this.$navTo.togo(`/pages2/wd/course?id=${item.goodsId}&gid=${item.gradeId}&orderGoodsId=${this.orderGoodsId}`);
|
|
|
+ } else if(res.data.total == 1) {
|
|
|
uni.navigateTo({
|
|
|
- url:`/pages3/polyv/detail?id=${res.data.rows[0].courseId}&goodsId=${item.goodsId}`
|
|
|
+ url: `/pages3/polyv/detail?id=${res.data.rows[0].courseId}&goodsId=${item.goodsId}&orderGoodsId=${this.orderGoodsId}`
|
|
|
+ })
|
|
|
+ } else {
|
|
|
+ uni.showToast({
|
|
|
+ icon:'none',
|
|
|
+ title:'暂无可观看的视频课程'
|
|
|
})
|
|
|
}
|
|
|
- });
|
|
|
- return;
|
|
|
- }
|
|
|
+
|
|
|
+ }
|
|
|
+ })
|
|
|
+ // if(item.courseNum == 1 ) {
|
|
|
+
|
|
|
+ // this.$api.courseCourseList({
|
|
|
+ // pageNum:1,
|
|
|
+ // pageSize:1,
|
|
|
+ // goodsId:item.goodsId,
|
|
|
+ // gradeId:item.gradeId
|
|
|
+ // }).then(res => {
|
|
|
+ // if(res.data.code == 200) {
|
|
|
+ // uni.navigateTo({
|
|
|
+ // url:`/pages3/polyv/detail?id=${res.data.rows[0].courseId}&goodsId=${item.goodsId}`
|
|
|
+ // })
|
|
|
+ // }
|
|
|
+ // });
|
|
|
+ // return;
|
|
|
+ // }
|
|
|
|
|
|
- this.$navTo.togo('/pages2/wd/course', {
|
|
|
- id: item.goodsId,
|
|
|
- gid: item.gradeId
|
|
|
- });
|
|
|
+ // this.$navTo.togo('/pages2/wd/course', {
|
|
|
+ // id: item.goodsId,
|
|
|
+ // gid: item.gradeId
|
|
|
+ // });
|
|
|
})
|
|
|
|
|
|
// arsty = '立刻学习';
|
|
@@ -217,6 +241,9 @@ export default {
|
|
|
this.$navTo.togo('/pages2/bank/question_detail', {
|
|
|
id: item.goodsId
|
|
|
});
|
|
|
+ } else if (item.goodsType == 6) {
|
|
|
+ // 进入直播课
|
|
|
+ this.toLive(item)
|
|
|
}
|
|
|
|
|
|
break;
|
|
@@ -261,6 +288,33 @@ export default {
|
|
|
break;
|
|
|
}
|
|
|
},
|
|
|
+ toLive(item) {
|
|
|
+ this.$api.courseCourseList({
|
|
|
+ pageNum: 1,
|
|
|
+ pageSize: 1,
|
|
|
+ goodsId: item.goodsId,
|
|
|
+ gradeId: 0,
|
|
|
+ orderGoodsId: this.orderGoodsId,
|
|
|
+ }).then(res => {
|
|
|
+ if (res.data.code == 200) {
|
|
|
+ if(res.data.total > 1) {
|
|
|
+ uni.navigateTo({
|
|
|
+ url:'/pages5/liveDetail/course?orderGoodsId='+this.orderGoodsId+'&goodsId='+item.goodsId+'&gradeId=0'
|
|
|
+ })
|
|
|
+ } else if(res.data.total == 1) {
|
|
|
+ uni.navigateTo({
|
|
|
+ url:'/pages3/live/detail?orderGoodsId='+this.orderGoodsId+'&goodsId='+item.goodsId+'&gradeId=0&courseId='+ res.data.rows[0].courseId
|
|
|
+ })
|
|
|
+ } else {
|
|
|
+ uni.showToast({
|
|
|
+ icon:'none',
|
|
|
+ title:'暂无可观看的直播课程'
|
|
|
+ })
|
|
|
+ }
|
|
|
+
|
|
|
+ }
|
|
|
+ })
|
|
|
+ },
|
|
|
/**
|
|
|
* @param {Object} goodsId 商品id
|
|
|
* 查询商品重修状态
|
|
@@ -341,6 +395,7 @@ export default {
|
|
|
}
|
|
|
|
|
|
this.listData = res.data.data;
|
|
|
+ console.log('listDatalistData:', this.listData)
|
|
|
if(res.data.data.goodsId) {
|
|
|
if(res.data.data.gradeId) {
|
|
|
this.$api.goodsDetail(res.data.data.goodsId).then(rs => {
|