更新
This commit is contained in:
@ -242,13 +242,15 @@ const handleOpenNotification = () => {
|
||||
allDep.value.forEach(item => {
|
||||
emitter.emit("makerPopup", { data:item, flag: "hm_pop",type:'Custom'});
|
||||
})
|
||||
} else {
|
||||
// 关闭主动展开后,恢复循环单条气泡展示
|
||||
startPopupLoop()
|
||||
}
|
||||
}
|
||||
const makerCenter = () => {
|
||||
const dw = require("@/assets/point/dingwei.png")
|
||||
qcckGet({},'/mosty-gsxt/tbYjxx/selectSsbm').then(res=>{
|
||||
emitter.emit('deletePointArea','hm')
|
||||
if(!showNotification.value) emitter.emit('deletePointArea','hm_pop')
|
||||
let list = res || [];
|
||||
list.forEach(item => {
|
||||
let obj = centralPoint.find(i => i.name == item.ssbm || i.ssbmdm == item.ssbmdm);
|
||||
@ -259,15 +261,6 @@ const makerCenter = () => {
|
||||
})
|
||||
allDep.value = list;
|
||||
emitter.emit("addPointArea", { coords:list, icon: dw, flag: "hm", size: '14px', showTitle: false, offset: [0, -25] });
|
||||
if(!showNotification.value){
|
||||
setTimeout(() => {
|
||||
// 没有主动展开提示,默认循环一个一个展示
|
||||
if(list.length > 0){
|
||||
emitter.emit("makerPopup", { data:list[indexNum.value], flag: "hm_pop",type:'Custom'});
|
||||
indexNum.value == list.length ? indexNum.value = 0 : indexNum.value++
|
||||
}
|
||||
}, 1000);
|
||||
}
|
||||
})
|
||||
}
|
||||
//播放音频
|
||||
@ -300,13 +293,26 @@ const initAudioPlayer = () => {
|
||||
})
|
||||
}
|
||||
const bnTimer = ref(null)
|
||||
const popupTimer = ref(null)
|
||||
|
||||
const startPopupLoop = () => {
|
||||
clearInterval(popupTimer.value)
|
||||
popupTimer.value = setInterval(() => {
|
||||
if (!showNotification.value && allDep.value.length > 0) {
|
||||
emitter.emit('deletePointArea','hm_pop')
|
||||
emitter.emit("makerPopup", { data: allDep.value[indexNum.value], flag: "hm_pop", type:'Custom' })
|
||||
indexNum.value = (indexNum.value + 1) % allDep.value.length
|
||||
}
|
||||
}, 10000)
|
||||
}
|
||||
// 组件挂载时初始化音频播放器
|
||||
onMounted(() => {
|
||||
getDepId()
|
||||
makerCenter()
|
||||
bnTimer.value = setInterval(()=>{
|
||||
makerCenter()
|
||||
},10000)
|
||||
},60000)
|
||||
startPopupLoop()
|
||||
mouseLeave()
|
||||
getTbYjxxGetList()
|
||||
// 初始化音频播放器
|
||||
@ -410,6 +416,7 @@ function changeModel(){
|
||||
onUnmounted(() => {
|
||||
clearInterval(timing.value)
|
||||
clearInterval(bnTimer.value)
|
||||
clearInterval(popupTimer.value)
|
||||
// 组件卸载时停止音频播放并释放资源
|
||||
if (audioPlayer) {
|
||||
audioPlayer.destroy()
|
||||
|
||||
Reference in New Issue
Block a user