增加签到,修改0元支付问题
This commit is contained in:
@@ -632,6 +632,7 @@
|
||||
},
|
||||
//选集弹窗的回调
|
||||
changeXj(e) {
|
||||
console.log(e)
|
||||
if (e.show == false) {
|
||||
//关闭弹窗的时候重置scrollIntoViews,防止关闭后第二次点就不能自动滑动到当前集的位置
|
||||
this.scrollIntoViews = 'video0'
|
||||
@@ -1095,7 +1096,11 @@
|
||||
this.$refs.popupPya.close()
|
||||
},
|
||||
//选择播放
|
||||
selectPlay(item) {
|
||||
selectPlay(item,type) {
|
||||
if ( this.videoList[this.current].videoUrl == '' && this.videoList[this.current].price <= 0 && !type ) {
|
||||
this.getDataList(this.courseId, this.courseDetailsId, true, 'select')
|
||||
return;
|
||||
}
|
||||
//重新计算一下当前观看的是哪个视频
|
||||
this.comNumVideo()
|
||||
//滚动到选择的位置
|
||||
@@ -1212,6 +1217,7 @@
|
||||
//滚动到指定位置
|
||||
goListPosition(courseDetailsId) {
|
||||
let _this = this;
|
||||
// this.scrollIntoViews = 'video0'
|
||||
this.$nextTick(() => {
|
||||
// setTimeout(()=>{
|
||||
console.log(courseDetailsId, '开始移动了')
|
||||
@@ -1238,7 +1244,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') : ''
|
||||
@@ -1347,7 +1353,9 @@
|
||||
}
|
||||
})
|
||||
}
|
||||
|
||||
if ( t == 'select') {
|
||||
this.selectPlay(this.videoList[this.current],true)
|
||||
}
|
||||
this.$forceUpdate();
|
||||
}
|
||||
|
||||
|
||||
@@ -1457,11 +1457,15 @@
|
||||
this.$forceUpdate()
|
||||
},
|
||||
//选择播放
|
||||
selectPlay(item) {
|
||||
selectPlay(item,type) {//price //videoUrl
|
||||
// 根据选择的courseDetailsId拿到meunList列表中的相同数据的下标
|
||||
const index = this.meunList.findIndex(menu => menu.courseDetailsId === item.courseDetailsId);
|
||||
this.videoList = [this.meunList[index]]
|
||||
this.current = 0
|
||||
if ( this.videoList[this.current].videoUrl == '' && this.videoList[this.current].price <= 0 && !type ) {
|
||||
this.getDataList(this.courseId, this.courseDetailsId, true, 'select')
|
||||
return;
|
||||
}
|
||||
//重新计算一下当前观看的是哪个视频
|
||||
this.comNumVideo()
|
||||
this.setWxUrl()
|
||||
@@ -1493,7 +1497,7 @@
|
||||
|
||||
},
|
||||
// 资源详情
|
||||
getDataList(id, courseDetailsId, type) {
|
||||
getDataList(id, courseDetailsId, type, t) {
|
||||
console.log('getDataList');
|
||||
let data = {
|
||||
id,
|
||||
@@ -1660,7 +1664,9 @@
|
||||
|
||||
})
|
||||
|
||||
|
||||
if ( t == 'select') {
|
||||
this.selectPlay(this.videoList[this.current],true)
|
||||
}
|
||||
}
|
||||
} else {
|
||||
uni.showToast({
|
||||
|
||||
@@ -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