From e1e8452b01eca0027911961ca04fd1eeda7d7a1c Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?Wangwei-=E7=8E=8B=E4=BC=9F?= <870653736@qq.com>
Date: Wed, 9 Nov 2022 15:16:19 +0800
Subject: [PATCH] =?UTF-8?q?update:=E5=9F=8B=E7=82=B9=E4=BC=98=E5=8C=96?=
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
---
src/views/video/play.vue | 46 +++++++++++++++++++++++-----------------
1 file changed, 26 insertions(+), 20 deletions(-)
diff --git a/src/views/video/play.vue b/src/views/video/play.vue
index 54036bc..1ba293c 100644
--- a/src/views/video/play.vue
+++ b/src/views/video/play.vue
@@ -18,8 +18,7 @@
-
+
@@ -138,7 +137,7 @@
showAutoBox: false,
is_duration: true,
is_scroll: false,
- playThisId:route.params.playid
+ playThisId: route.params.playid
})
@@ -178,20 +177,24 @@
const postSourceDeviceLog = async () => {
let get_from = route.query.from || null;
const params = {
- source:get_from,
- device:isMobileValue()
+ source: get_from,
+ device: isMobileValue()
}
await sourceDeviceLog(params);
}
-
+
// 埋点请求
const postlogData = async (logData) => {
- await classlog(logData);
+ let logParams = {
+ ...logData,
+ vid: state.videoid
+ }
+ await classlog(logParams);
}
// 列表点击切换视频
- const getvideo_click = async (id, replay=0) => {
+ const getvideo_click = async (id, replay = 0) => {
state.playThisId = id;
state.is_duration = false;
clearInterval(state.timerTxt);
@@ -201,7 +204,7 @@
state.ckPlayer = null;
document.getElementById("VideoPlay").innerHTML = "";
- setTimeout(function () {
+ setTimeout(function () {
getvideoDom(id, replay);
getNextId(id);
state.videoObject.autoplay = true;
@@ -227,10 +230,10 @@
* @replay 1=重播
* @resOne 1=第一次进入页面播放
**/
- const getvideoDom = async (id, replay=0, resOne=0) => {
+ const getvideoDom = async (id, replay = 0, resOne = 0) => {
// 首次播放埋点
- if(resOne === 1){
+ if (resOne === 1) {
postSourceDeviceLog();
}
@@ -242,7 +245,7 @@
state.play_title = res.data.it618_name;
state.videoObject.video = res.data.it618_videourl;
- console.log('res.data',res.data);
+ console.log('res.data', res.data);
if (res.data.playtime > 0) {
state.videoObject.seek = res.data.playtime;
@@ -252,7 +255,7 @@
}
// console.log('replay',replay);
// console.log('seek',state.videoObject.seek);
-
+
state.msg = res.message;
if (res.status === -1) {
state.isAuth = false;
@@ -338,7 +341,7 @@
// 发送埋点 切换视频发送 第一次播放不发送
let get_duration = localStorage.getItem(state.videoid + '_duration_video');
- if(resOne !=1 && get_duration){
+ if (resOne != 1 && get_duration) {
let logData = {
logid: state.logid,
pytime: localStorage.getItem(state.videoid + '_playTime_video'),
@@ -350,7 +353,7 @@
// 重置新id
state.logid = res.data.logid;
state.videoid = res.data.id;
- console.log('log_videoid',state.videoid);
+ console.log('log_videoid', state.videoid);
// 修改路由
let winState = { url: id };
@@ -535,16 +538,18 @@
font-size: 24px;
padding-bottom: 20px;
}
- .txt_next{
+
+ .txt_next {
color: #fff;
font-size: 16px;
margin-bottom: 36px;
}
- .sel_btn_box{
+ .sel_btn_box {
width: 310px;
margin: 0 auto;
- .btn_sty{
+
+ .btn_sty {
width: 46%;
height: 40px;
line-height: 40px;
@@ -554,6 +559,7 @@
border: 1px solid #fff;
border-radius: 6px;
cursor: pointer;
+
&:hover {
background-color: #0082fc;
border: 1px solid #0082fc;
@@ -785,7 +791,7 @@
display: block !important;
}
- .autotime{
+ .autotime {
height: 35vh;
top: 50px;
}