Commit 27757f0c authored by 王炽's avatar 王炽

Merge branch 'dev' of http://gitlab2.dui88.com/fh/20250528_FHQ1 into dev

parents a7171a1b 71d1e388
...@@ -62,11 +62,13 @@ const sensorLog = (evt) => { ...@@ -62,11 +62,13 @@ const sensorLog = (evt) => {
trackObj[key] = logObj[key]; trackObj[key] = logObj[key];
} }
if (xcxPage && xcxPage.length > 0) { if (xcxPage && xcxPage.length > 0) {
console.warn("xcxPage", trackObj);
sensors.track("xcxPage", { sensors.track("xcxPage", {
...trackObj, ...trackObj,
}); });
} }
if (xcxClick && xcxClick.length > 0) { if (xcxClick && xcxClick.length > 0) {
console.warn("xcxClick", trackObj);
sensors.track("xcxClick", { sensors.track("xcxClick", {
...trackObj, ...trackObj,
}); });
......
...@@ -237,8 +237,8 @@ ...@@ -237,8 +237,8 @@
</view> </view>
<view v-if="showVideo" class="video-popup"> <view v-if="showVideo" class="video-popup">
<video :src="currentVideoUrl" controls autoplay <video :src="currentVideoUrl" controls autoplay
:style="{ width: videoWidth + 'px', height: videoHeight + 'px' }" :style="{ width: videoWidth + 'px', height: videoHeight + 'px' }" @loadedmetadata="onVideoLoadedMeta"
@loadedmetadata="onVideoLoadedMeta" @play="onVideoPlay"></video> @play="onVideoPlay"></video>
<view class="close-btn-bottom" @tap="closeVideo">×</view> <view class="close-btn-bottom" @tap="closeVideo">×</view>
</view> </view>
</view> </view>
...@@ -1116,7 +1116,7 @@ export default { ...@@ -1116,7 +1116,7 @@ export default {
initVideoContexts() { initVideoContexts() {
this.$nextTick(() => { this.$nextTick(() => {
const videoIds = ['brandVideo1', 'brandVideo2']; const videoIds = ['brandVideo1', 'brandVideo2'];
videoIds.forEach(id => { videoIds.forEach(id => {
try { try {
// 使用id创建视频上下文 // 使用id创建视频上下文
...@@ -1135,15 +1135,40 @@ export default { ...@@ -1135,15 +1135,40 @@ export default {
}, },
// 视频1播放事件 // 视频1播放事件
onVideo1Play() { onVideo1Play() {
const evt = {
currentTarget: {
dataset: {
log: {
xcxClick: '品牌故事-次屏页面点击',
pageName: '品牌故事-首屏页面',
buttonName: '腰部品牌Video'
}
}
}
}
md.sensorLog(evt);
console.log('视频1开始播放'); console.log('视频1开始播放');
this.handleVideoPlay('brandVideo1'); this.handleVideoPlay('brandVideo1');
}, },
// 视频2播放事件 // 视频2播放事件
onVideo2Play() { onVideo2Play() {
const evt = {
currentTarget: {
dataset: {
log: {
xcxClick: '小程序页面点击事件',
pageName: '品牌故事-次屏页面',
buttonName: '视频'
}
}
}
}
md.sensorLog(evt);
console.log('视频2开始播放'); console.log('视频2开始播放');
this.handleVideoPlay('brandVideo2'); this.handleVideoPlay('brandVideo2');
}, },
// 处理视频播放(互斥逻辑) // 处理视频播放(互斥逻辑)
handleVideoPlay(videoId) { handleVideoPlay(videoId) {
console.log('处理视频播放:', videoId, '当前播放视频:', this.currentPlayingVideo); console.log('处理视频播放:', videoId, '当前播放视频:', this.currentPlayingVideo);
...@@ -1176,7 +1201,7 @@ export default { ...@@ -1176,7 +1201,7 @@ export default {
return; return;
} }
} }
if (this.videoContexts[videoId]) { if (this.videoContexts[videoId]) {
try { try {
this.videoContexts[videoId].pause(); this.videoContexts[videoId].pause();
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment