From 1be09bf67a926207e01e4132daa6694a8df05f4b Mon Sep 17 00:00:00 2001
From: YeMingfei666 <1619116647@qq.com>
Date: Tue, 21 Jan 2025 15:20:05 +0800
Subject: [PATCH] =?UTF-8?q?=E4=BF=AE=E5=A4=8D=E8=A7=86=E9=A2=91=E4=B8=8D?=
=?UTF-8?q?=E6=98=BE=E7=A4=BA=E6=94=AF=E4=BB=98=E6=AC=A1=E6=95=B0=E9=97=AE?=
=?UTF-8?q?=E9=A2=98?=
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
---
api/video/index.js | 12 +++++++++++-
components/my-video-list/list-item.vue | 14 +++++++-------
components/my-video-list/my-video-list.vue | 16 +++++++++++-----
3 files changed, 29 insertions(+), 13 deletions(-)
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