修复h5一进来是未解锁剧集时选集等信息不出现问题
This commit is contained in:
parent
8728844446
commit
adf4fcfcfc
|
|
@ -233,6 +233,7 @@
|
|||
})
|
||||
onMounted(() => {
|
||||
init()
|
||||
console.log('itemMounted', props.index);
|
||||
emits('itemMounted', props.index)
|
||||
})
|
||||
|
||||
|
|
|
|||
|
|
@ -332,10 +332,6 @@
|
|||
const res = await Api.payOrder(data)
|
||||
console.log(res);
|
||||
if (res) {
|
||||
uni.navigateTo({
|
||||
url: '/pages/pays/pays?orderId=' + data.orderId + '&url=' + res.h5Url
|
||||
});
|
||||
return
|
||||
// #ifdef APP
|
||||
uni.navigateTo({
|
||||
url: '/pages/pays/pays?orderId=' + res.orderId + '&url=' + res.h5Url
|
||||
|
|
@ -348,8 +344,20 @@
|
|||
}
|
||||
//金币支付
|
||||
async function goldPay(data) {
|
||||
emits('update', {
|
||||
index: popup.index
|
||||
})
|
||||
const res = await Api.goldPay(data)
|
||||
console.log(res);
|
||||
if (res) {
|
||||
uni.showToast({
|
||||
title: '解锁成功',
|
||||
icon: 'none'
|
||||
})
|
||||
emits('update', {
|
||||
index: popup.index
|
||||
})
|
||||
}
|
||||
|
||||
}
|
||||
//确认支付
|
||||
async function payConfirm() {
|
||||
|
|
@ -364,21 +372,21 @@
|
|||
if (num == 1) {
|
||||
data.courseDetailsId = popup.data.courseDetailsId
|
||||
}
|
||||
|
||||
|
||||
const res = num == '10' ? await Api.buyTenVideo(data) : await Api.buyVideo(data)
|
||||
if (res) {
|
||||
if(type=='gold'){
|
||||
if (type == 'gold') {
|
||||
goldPay({
|
||||
orderId: res.orders.ordersId
|
||||
})
|
||||
}else{
|
||||
} else {
|
||||
payOrder({
|
||||
orderId: res.orders.ordersId
|
||||
})
|
||||
}
|
||||
|
||||
|
||||
} else {
|
||||
|
||||
|
||||
}
|
||||
|
||||
|
||||
|
|
@ -420,7 +428,7 @@
|
|||
clearTimeout(positonmer)
|
||||
console.log('goListPosition:' + index)
|
||||
const el = refList.value[index]
|
||||
if ($mountedComponents[props.list.length - 1]) {
|
||||
if ($mountedComponents[props.list.length - 1] && $mountedComponents[index]) {
|
||||
domModule.scrollToElement(el, {
|
||||
animated: false
|
||||
})
|
||||
|
|
@ -682,6 +690,12 @@
|
|||
return videoList.value[current.value].price
|
||||
})
|
||||
const rightStyle = computed(() => {
|
||||
const item = props.list[nowIndex.value]
|
||||
if (!item.videoUrl) {
|
||||
return {
|
||||
transform: `translateX(0)`
|
||||
}
|
||||
}
|
||||
// #ifdef H5
|
||||
return {
|
||||
transform: `translateX(${!control.showControls?'0':60}px)`
|
||||
|
|
@ -694,6 +708,12 @@
|
|||
// #endif
|
||||
})
|
||||
const infoStyle = computed(() => {
|
||||
const item = props.list[nowIndex.value]
|
||||
if (!item.videoUrl) {
|
||||
return {
|
||||
transform: `translateX(0)`
|
||||
}
|
||||
}
|
||||
// #ifdef H5
|
||||
return {
|
||||
transform: `translateX(${!control.showControls?0:'-110%'})`
|
||||
|
|
|
|||
|
|
@ -48,7 +48,11 @@
|
|||
index,
|
||||
item
|
||||
}) {
|
||||
state.list[index] = item
|
||||
if(item){
|
||||
state.list[index] = item
|
||||
}else{
|
||||
init()
|
||||
}
|
||||
}
|
||||
onLoad((opt) => {
|
||||
Object.assign(options, opt)
|
||||
|
|
|
|||
Loading…
Reference in New Issue