Merge branch 'gaohao' of https://e.coding.net/g-cphe0354/duanju/video_app into test
This commit is contained in:
commit
ad94cbf772
|
|
@ -575,11 +575,7 @@
|
||||||
},
|
},
|
||||||
//播放时的回掉
|
//播放时的回掉
|
||||||
videoPlay(videoId, courseDetailsId) {
|
videoPlay(videoId, courseDetailsId) {
|
||||||
console.log(courseDetailsId)
|
|
||||||
console.log(this.playFlag)
|
|
||||||
// this.courseDetailsId = courseDetailsId
|
|
||||||
if (!this.playFlag) {
|
if (!this.playFlag) {
|
||||||
this.getDataList(this.courseId, this.videoList[this.current].courseDetailsId, true);
|
|
||||||
this.playFlag = true
|
this.playFlag = true
|
||||||
httpsRequest.getT('app/course/viewCourse', {
|
httpsRequest.getT('app/course/viewCourse', {
|
||||||
courseId: this.courseId,
|
courseId: this.courseId,
|
||||||
|
|
@ -622,12 +618,14 @@
|
||||||
console.log("appear===" + e)
|
console.log("appear===" + e)
|
||||||
console.log("appear===" + index)
|
console.log("appear===" + index)
|
||||||
// this.courseDetailsId = e
|
// this.courseDetailsId = e
|
||||||
|
console.log(e)
|
||||||
this.current = index
|
this.current = index
|
||||||
this.showControls = true
|
this.showControls = true
|
||||||
this.isShowVideo = e
|
this.isShowVideo = e
|
||||||
this.scrollIntoViews = 'video' + index
|
this.scrollIntoViews = 'video' + index
|
||||||
this.scrollIntoView = 'video' + index
|
this.scrollIntoView = 'video' + index
|
||||||
console.log(this.scrollIntoViews, '当前位置')
|
console.log(this.scrollIntoViews, '当前位置')
|
||||||
|
this.getDataList(this.courseId, this.videoList[this.current].courseDetailsId);
|
||||||
//播放并更新video的上下文
|
//播放并更新video的上下文
|
||||||
this.startPlay(index)
|
this.startPlay(index)
|
||||||
//插入历史记录
|
//插入历史记录
|
||||||
|
|
@ -1066,13 +1064,24 @@
|
||||||
//单集解锁
|
//单集解锁
|
||||||
data.courseDetailsId = this.videoList[this.current].courseDetailsId
|
data.courseDetailsId = this.videoList[this.current].courseDetailsId
|
||||||
}
|
}
|
||||||
|
console.log(this.videoList[this.current].courseDetailsId)
|
||||||
|
console.log((num && num == 10) ? '/app/order/insertCourseOrders/limit10' :
|
||||||
|
'/app/order/insertCourseOrders')
|
||||||
httpsRequest.getT((num && num == 10) ? '/app/order/insertCourseOrders/limit10' :
|
httpsRequest.getT((num && num == 10) ? '/app/order/insertCourseOrders/limit10' :
|
||||||
'/app/order/insertCourseOrders', data).then(res => {
|
'/app/order/insertCourseOrders', data).then(res => {
|
||||||
console.log(3)
|
console.log(res)
|
||||||
if (res.code == 0) {
|
if (res.code == 0) {
|
||||||
|
|
||||||
|
console.log(res.status && res.status == 1)
|
||||||
|
if (res.status && res.status == 1) {
|
||||||
|
this.showPay = false //关闭购买选择弹窗
|
||||||
|
this.isOrder = true
|
||||||
|
this.getDataList(this.courseId, this.videoList[this.current].courseDetailsId,
|
||||||
|
true);
|
||||||
|
return;
|
||||||
|
} else{
|
||||||
this.ordersId = res.data.orders.ordersId //记录订单id
|
this.ordersId = res.data.orders.ordersId //记录订单id
|
||||||
this.payMoney = res.data.orders.payMoney //记录订单价格
|
this.payMoney = res.data.orders.payMoney //记录订单价格
|
||||||
|
|
||||||
if (type == 1) { //金币
|
if (type == 1) { //金币
|
||||||
this.payOrder(res.data.orders.ordersId, res.data.orders.payMoney)
|
this.payOrder(res.data.orders.ordersId, res.data.orders.payMoney)
|
||||||
} else if (type == 2) { //支付宝
|
} else if (type == 2) { //支付宝
|
||||||
|
|
@ -1081,15 +1090,11 @@
|
||||||
this.openPopusPay() //显示充值弹窗
|
this.openPopusPay() //显示充值弹窗
|
||||||
}
|
}
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
// this.payOrder(res.data.orders.ordersId, res.data.orders.payMoney)
|
// this.payOrder(res.data.orders.ordersId, res.data.orders.payMoney)
|
||||||
} else {
|
} else {
|
||||||
if (res.status && res.status == 1) {
|
|
||||||
this.showPay = false //关闭购买选择弹窗
|
|
||||||
this.isOrder = true
|
|
||||||
this.getDataList(this.courseId, this.videoList[this.current].courseDetailsId,
|
|
||||||
true);
|
|
||||||
return;
|
|
||||||
}
|
|
||||||
uni.showToast({
|
uni.showToast({
|
||||||
title: res.msg,
|
title: res.msg,
|
||||||
icon: 'none'
|
icon: 'none'
|
||||||
|
|
@ -1103,6 +1108,7 @@
|
||||||
httpsRequest.postT("/app/order/payOrders", {
|
httpsRequest.postT("/app/order/payOrders", {
|
||||||
orderId: orderId,
|
orderId: orderId,
|
||||||
}).then(res => {
|
}).then(res => {
|
||||||
|
console.log("orderIds==" + res)
|
||||||
if (res.code == 0) {
|
if (res.code == 0) {
|
||||||
uni.hideLoading()
|
uni.hideLoading()
|
||||||
uni.showToast({
|
uni.showToast({
|
||||||
|
|
@ -1228,9 +1234,9 @@
|
||||||
//播放结束后播放下一集
|
//播放结束后播放下一集
|
||||||
ended() {
|
ended() {
|
||||||
if (this.current < this.videoList.length - 1) {
|
if (this.current < this.videoList.length - 1) {
|
||||||
// this.current += 1
|
|
||||||
this.$nextTick(() => {
|
this.$nextTick(() => {
|
||||||
let courseDetailsId = this.videoList[this.current + 1].courseDetailsId
|
this.current += 1
|
||||||
|
let courseDetailsId = this.videoList[this.current].courseDetailsId
|
||||||
console.log(courseDetailsId, '开始移动了')
|
console.log(courseDetailsId, '开始移动了')
|
||||||
const el = this.$refs['list' + courseDetailsId][0]
|
const el = this.$refs['list' + courseDetailsId][0]
|
||||||
listDom.scrollToElement(el, {})
|
listDom.scrollToElement(el, {})
|
||||||
|
|
@ -1300,6 +1306,7 @@
|
||||||
id: courseId,
|
id: courseId,
|
||||||
token: uni.getStorageSync('token') ? uni.getStorageSync('token') : ''
|
token: uni.getStorageSync('token') ? uni.getStorageSync('token') : ''
|
||||||
};
|
};
|
||||||
|
console.log(courseDetailsId)
|
||||||
httpsRequest.getT('/app/course/selectCourseDetailsById', data).then(res => {
|
httpsRequest.getT('/app/course/selectCourseDetailsById', data).then(res => {
|
||||||
|
|
||||||
if (res.code == 0) {
|
if (res.code == 0) {
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue