Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
飞
飞鹤小程序
Project
Project
Details
Activity
Releases
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Commits
Issue Boards
Open sidebar
FH
飞鹤小程序
Commits
71d1e388
Commit
71d1e388
authored
Aug 12, 2025
by
spc
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
brand md
parent
af49fdfd
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
32 additions
and
5 deletions
+32
-5
md.js
md.js
+2
-0
Brand.vue
views/Brand.vue
+30
-5
No files found.
md.js
View file @
71d1e388
...
...
@@ -62,11 +62,13 @@ const sensorLog = (evt) => {
trackObj
[
key
]
=
logObj
[
key
];
}
if
(
xcxPage
&&
xcxPage
.
length
>
0
)
{
console
.
warn
(
"xcxPage"
,
trackObj
);
sensors
.
track
(
"xcxPage"
,
{
...
trackObj
,
});
}
if
(
xcxClick
&&
xcxClick
.
length
>
0
)
{
console
.
warn
(
"xcxClick"
,
trackObj
);
sensors
.
track
(
"xcxClick"
,
{
...
trackObj
,
});
...
...
views/Brand.vue
View file @
71d1e388
...
...
@@ -237,8 +237,8 @@
</view>
<view
v-if=
"showVideo"
class=
"video-popup"
>
<video
:src=
"currentVideoUrl"
controls
autoplay
:style=
"{ width: videoWidth + 'px', height: videoHeight + 'px' }"
@
loadedmetadata=
"onVideoLoadedMeta"
@
play=
"onVideoPlay"
></video>
:style=
"{ width: videoWidth + 'px', height: videoHeight + 'px' }"
@
loadedmetadata=
"onVideoLoadedMeta"
@
play=
"onVideoPlay"
></video>
<view
class=
"close-btn-bottom"
@
tap=
"closeVideo"
>
×
</view>
</view>
</view>
...
...
@@ -1116,7 +1116,7 @@ export default {
initVideoContexts
()
{
this
.
$nextTick
(()
=>
{
const
videoIds
=
[
'brandVideo1'
,
'brandVideo2'
];
videoIds
.
forEach
(
id
=>
{
try
{
// 使用id创建视频上下文
...
...
@@ -1135,15 +1135,40 @@ export default {
},
// 视频1播放事件
onVideo1Play
()
{
const
evt
=
{
currentTarget
:
{
dataset
:
{
log
:
{
xcxClick
:
'品牌故事-次屏页面点击'
,
pageName
:
'品牌故事-首屏页面'
,
buttonName
:
'腰部品牌Video'
}
}
}
}
md
.
sensorLog
(
evt
);
console
.
log
(
'视频1开始播放'
);
this
.
handleVideoPlay
(
'brandVideo1'
);
},
// 视频2播放事件
onVideo2Play
()
{
const
evt
=
{
currentTarget
:
{
dataset
:
{
log
:
{
xcxClick
:
'小程序页面点击事件'
,
pageName
:
'品牌故事-次屏页面'
,
buttonName
:
'视频'
}
}
}
}
md
.
sensorLog
(
evt
);
console
.
log
(
'视频2开始播放'
);
this
.
handleVideoPlay
(
'brandVideo2'
);
},
// 处理视频播放(互斥逻辑)
handleVideoPlay
(
videoId
)
{
console
.
log
(
'处理视频播放:'
,
videoId
,
'当前播放视频:'
,
this
.
currentPlayingVideo
);
...
...
@@ -1176,7 +1201,7 @@ export default {
return
;
}
}
if
(
this
.
videoContexts
[
videoId
])
{
try
{
this
.
videoContexts
[
videoId
].
pause
();
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment