|
@@ -3,7 +3,7 @@ import {ref,reactive,onMounted,onActivated} from 'vue'
|
|
|
import { useElementSize } from '@vueuse/core'
|
|
|
|
|
|
import {apiFICCPermissionList,apiGetWechatQRCode} from '@/api/common'
|
|
|
-import {apiVideoList} from '@/api/video'
|
|
|
+import {apiVideoList,apiVideoPlayLog} from '@/api/video'
|
|
|
|
|
|
import SelfList from '@/components/SelfList.vue'
|
|
|
|
|
@@ -65,7 +65,7 @@ const getVideoList=async ()=>{
|
|
|
}
|
|
|
}
|
|
|
}
|
|
|
-getVideoList()
|
|
|
+// getVideoList()
|
|
|
|
|
|
//刷新列表
|
|
|
const refreshList=()=>{
|
|
@@ -86,6 +86,12 @@ const onLoad=()=>{
|
|
|
let curVideoId=ref(0)
|
|
|
const handelClickPlay=(item)=>{
|
|
|
curVideoId.value=item.community_video_id
|
|
|
+ //记录播放
|
|
|
+ apiVideoPlayLog({video_id:Number(item.community_video_id)}).then(res=>{
|
|
|
+ if(res.code===200){
|
|
|
+ console.log('视频埋点成功');
|
|
|
+ }
|
|
|
+ })
|
|
|
}
|
|
|
|
|
|
|
|
@@ -112,6 +118,7 @@ onMounted(() => {
|
|
|
});
|
|
|
|
|
|
onActivated(()=>{
|
|
|
+ curVideoId.value=0
|
|
|
//向小程序发送消息
|
|
|
let postData = {
|
|
|
path: "/pages/video/videoList",
|
|
@@ -190,6 +197,7 @@ onActivated(()=>{
|
|
|
disablePictureInPicture
|
|
|
autoplay
|
|
|
v-if="item.community_video_id==curVideoId"
|
|
|
+ @ended="curVideoId=0"
|
|
|
></video>
|
|
|
<div v-else class="poster-img" :style="'background-image:url('+item.cover_img_url+')'" @click="handelClickPlay(item)"></div>
|
|
|
<div class="time">发布时间:{{item.publish_time}}</div>
|