增加签到,修改0元支付问题
This commit is contained in:
@@ -1032,11 +1032,15 @@
|
||||
this.$forceUpdate()
|
||||
},
|
||||
//选择播放
|
||||
selectPlay(item, index) {
|
||||
selectPlay(item, index, type) {
|
||||
// 根据选择的courseDetailsId拿到meunList列表中的相同数据的下标
|
||||
// const index = this.meunList.findIndex(menu => menu.courseDetailsId === item.courseDetailsId);
|
||||
// this.videoList = [this.meunList[index]]
|
||||
this.current = index
|
||||
if ( this.videoList[this.current].videoUrl == '' && this.videoList[this.current].price <= 0 && !type ) {
|
||||
this.getDataList(this.courseId, this.courseDetailsId, true, 'select')
|
||||
return;
|
||||
}
|
||||
//重新计算一下当前观看的是哪个视频
|
||||
this.comNumVideo()
|
||||
// 把选择的视频的自动播放设置为true
|
||||
@@ -1270,7 +1274,7 @@
|
||||
* @param {Number} courseDetailsId 当前视频id
|
||||
* @param {boolean} type 是购买后返回的还是直接进来的
|
||||
*/
|
||||
getDataList(courseId, courseDetailsId, type) {
|
||||
getDataList(courseId, courseDetailsId, type, t) {
|
||||
let data = {
|
||||
id: courseId,
|
||||
token: uni.getStorageSync('token') ? uni.getStorageSync('token') : ''
|
||||
@@ -1381,7 +1385,9 @@
|
||||
} else { //不能播放则需要购买
|
||||
this.openPay()
|
||||
}
|
||||
|
||||
if ( t == 'select') {
|
||||
this.selectPlay(this.videoList[this.current],this.current,true)
|
||||
}
|
||||
this.$forceUpdate();
|
||||
//插入历史记录
|
||||
this.setHistor(this.videoList[this.current].courseId, this.videoList[this.current]
|
||||
|
||||
Reference in New Issue
Block a user