diff --git a/api/video/index.js b/api/video/index.js index 01890cf..68209ef 100644 --- a/api/video/index.js +++ b/api/video/index.js @@ -137,4 +137,14 @@ export function playStatus(data) { method: 'GET', data }) -} \ No newline at end of file +} + +// 获取支付次数提示 +export function getPayTips(data){ + return http.request({ + url: 'course/getRedEnvelopeTips', + method: 'GET', + data + }) + +} diff --git a/components/my-video-list/list-item.vue b/components/my-video-list/list-item.vue index cd4d8a8..fabb160 100644 --- a/components/my-video-list/list-item.vue +++ b/components/my-video-list/list-item.vue @@ -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) - }) //是否是第一次加载时的播放,不是暂停再播放 @@ -242,6 +240,7 @@ } }) // #endif + } @@ -254,6 +253,7 @@ } }) // #endif + } diff --git a/components/my-video-list/my-video-list.vue b/components/my-video-list/my-video-list.vue index d1c2763..ad67a27 100644 --- a/components/my-video-list/my-video-list.vue +++ b/components/my-video-list/my-video-list.vue @@ -146,7 +146,7 @@ - 每日前10次付款均可获取抽奖机会,抽奖保底抽中付款金额等额红包,红包可直接提现。当前为第1次付款 + {{paytips}} @@ -271,8 +271,9 @@ const showAndriod = !isH5 && isAndriod ? true : false let initing = true 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