Commit 9d1eb136 by 陈岩

feat: 增加场景切换时的视频文字

1 parent 0da779c8
......@@ -68,7 +68,6 @@ export default {
},
mounted() {
this.init(this.playUrl);
console.log('mounted', window.JessibucaPro);
},
beforeDestroy() {
this.destroy();
......
......@@ -78,6 +78,9 @@
</div>
<div v-else>
<livePlayer ref="vionPlayer" @play-success="handlePlaySuccess" @screenshotEnd="screenshotEnd"></livePlayer>
<div class="gate-name-badge" v-if="gateEditName">
<span class="gate-name-badge-text">{{ gateEditName }}</span>
</div>
<!--TODO: 暂时不需要了-->
<div style="display: none">
<div class="tour-btns" v-if="paramObj.type == 'titem'">
......@@ -116,7 +119,7 @@
</div>
<!-- 监控点选择器 -->
<van-popup v-model:show="pointPopupShow" round position="bottom">
<van-picker :default-index="pointListIndex" :title="paramObj.mallName" :columns="pointList" :option-height="40"
<van-picker :default-index="pointListIndex" :title="paramObj.name" :columns="pointList" :option-height="40"
@confirm="pointConfirm" @cancel="pointPopupShow = false" />
</van-popup>
<!-- 监控场景名称修改 -->
......@@ -372,7 +375,6 @@ const reqPatrolGateList = () => {
});
};
const pointConfirm = (row) => {
console.log(row);
paramObj.id = row.id;
paramObj.name = row.name;
gateEditName.value = paramObj.name;
......@@ -385,6 +387,18 @@ const pointConfirm = (row) => {
)[0].index;
pointPopupShow.value = false;
vionPlayer.value.playWebVideo(paramObj);
// 等待app与小程序更新
// const msg = { type: 'gate-name', data: { name: row.name } };
// if (wx && wx.miniProgram && typeof wx.miniProgram.postMessage === 'function') {
// wx.miniProgram.postMessage({ data: msg });
// }
// if (typeof uni !== 'undefined' && typeof uni.postMessage === 'function') {
// uni.postMessage({ data: msg });
// }
// window.postMessage(msg, '*');
};
const navBackTour = () => {
wx.miniProgram.navigateBack();
......@@ -848,6 +862,7 @@ const pictureProcess = (imgUrl) => {
imgUrl,
id: paramObj.id,
origin: originUser.value,
type: 'screenshot'
}
}
handleWxInfo(params.data)
......@@ -1076,4 +1091,25 @@ onMounted(() => {
text-overflow: ellipsis;
-o-text-overflow: ellipsis;
}
.gate-name-badge {
position: fixed;
top: 12px;
left: 12px;
background: rgba(0, 0, 0, 0.55);
color: #fff;
padding: 6px 12px;
border-radius: 14px;
font-size: 20px;
line-height: 20px;
z-index: 1000;
box-shadow: 0 2px 8px rgba(0, 0, 0, 0.25);
max-width: 70vw;
}
.gate-name-badge-text {
display: inline-block;
max-width: 70vw;
overflow: hidden;
white-space: nowrap;
text-overflow: ellipsis;
}
</style>
Markdown is supported
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!