修复视频不显示支付次数问题

This commit is contained in:
2025-01-21 15:20:05 +08:00
parent fffcdf483b
commit 1be09bf67a
3 changed files with 29 additions and 13 deletions

View File

@@ -138,3 +138,13 @@ export function playStatus(data) {
data
})
}
// 获取支付次数提示
export function getPayTips(data){
return http.request({
url: 'course/getRedEnvelopeTips',
method: 'GET',
data
})
}

View File

@@ -5,7 +5,7 @@
play-btn-position="center"
:show-center-play-btn="false"
:show-play-btn="false"
:controls="true"
:controls="!isPlying"
@click.stop="videoClick()"
@loadedmetadata="loadedmetadata"
@timeupdate="timeupdate" @waiting="waiting()" object-fit="cover" @pause="onpause"
@@ -161,7 +161,7 @@
let autoplay = ref(props.item.videoUrl ? true : false)
const emits = defineEmits(['controlstoggles', 'disappear', 'appear', 'waiting', 'videoPlay', 'ended', 'dianzanClick',
'share', 'zhuijuClick', 'popupShow', 'itemMounted', 'toDetail', 'showInfo', 'playStatusChange'
'share', 'zhuijuClick', 'popupShow', 'itemMounted', 'toDetail', 'playStatusChange'
])
function posterClick(){
if(!props.item.videoUrl){
@@ -169,7 +169,9 @@
}
}
function controlstoggles(e) {
emits('controlstoggles', e)
console.log('controlstoggles');
console.log(e);
// emits('controlstoggles', e)
}
function toDetail() {
@@ -190,10 +192,6 @@
let isPlying = ref(false)
watch(() => isPlying.value, (newval) => {
console.log(newval);
emits('showInfo', newval)
})
//是否是第一次加载时的播放,不是暂停再播放
@@ -243,6 +241,7 @@
})
// #endif
}
function onpause() {
@@ -254,6 +253,7 @@
}
})
// #endif
}

View File

@@ -146,7 +146,7 @@
<up-icon name="close" :size="16" color="#333" bold @click="popupClose('pay')"></up-icon>
</view>
<view class="u-m-t-30">
<text class=" color-999 u-font-24">每日前10次付款均可获取抽奖机会抽奖保底抽中付款金额等额红包红包可直接提现当前为第1次付款</text>
<text class=" color-999 u-font-24">{{paytips}} </text>
</view>
<view class="colo-333 pay-list font-bold u-font-28 u-m-t-20">
<view class="pay-list-item" v-if="info&&info.price" @click="payBtnClick('money','all')">
@@ -273,6 +273,7 @@
const refPoster = ref(null)
let paytips=ref('')
const props = defineProps({
list: {
type: Array,
@@ -328,7 +329,7 @@
})
function controlstoggles(e) {
console.log(e);
console.log('controlstoggles');
control.showControls = e.detail.show
control.showBack = control.showControls
}
@@ -634,7 +635,7 @@
}
}
function popupShow(key = 'show', item, index) {
async function popupShow(key = 'show', item, index) {
console.log(key, item, 'debug');
console.log('key' + popup[key]);
console.log('popupShow');
@@ -648,6 +649,11 @@
xuanjiInit()
// #endif
}
if(key=='pay'){
const res=await Api.getPayTips()
console.log(res);
paytips.value=res
}
popup[key] = true
if (item) {
popup.data = item