Toggle navigation
Toggle navigation
This project
Loading...
Sign in
Hooke
/
map-demo
Go to a project
Toggle navigation
Toggle navigation pinning
Projects
Groups
Snippets
Help
Project
Activity
Repository
Pipelines
Graphs
Issues
0
Merge Requests
0
Wiki
Snippets
Network
Create a new issue
Builds
Commits
Issue Boards
Authored by
hookehuyr
2023-07-08 11:28:22 +0800
Browse Files
Options
Browse Files
Download
Email Patches
Plain Diff
Commit
ef2d7403263663a701d9a8d2f9e954b0141bc312
ef2d7403
1 parent
4627763a
fix
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
7 additions
and
19 deletions
src/components/InfoWindow.vue
src/components/InfoWindowWarn.vue
src/components/InfoWindow.vue
View file @
ef2d740
...
...
@@ -93,25 +93,12 @@ export default {
},
infoWindow(val) {
if (val) {
if (this.info?.details[this.isActive]['audio']) { // 实体有音频时
if (this.info?.details
.length && this.info?.details
[this.isActive]['audio']) { // 实体有音频时
// 存放到pinia里面控制
this.changeAudio(this.audio);
this.changeAudioStatus('pause');
// 加载录音
this.play_time = '01:49'
// this.audio.src = this.info?.details[this.isActive]['audio'];
// let play_status = this.audio.play() // 播放
// if (play_status) {
// play_status.then(() => {
// // 音频的播放需要耗时
// this.is_play = false;
// this.audio.pause();
// this.play_time = this.getAudioTime(this.audio.duration)
// }).catch((e) => {
// // 失败
// console.log('Operation is too fast, audio play fails')
// })
// }
this.play_time = this.info?.details[this.isActive]['audio_time']
}
}
},
...
...
@@ -210,14 +197,12 @@ export default {
this.ind = 0
}, this.audio.duration * 1000) // audio.duration 为音频的时长单位为秒
setInterval(() => {
this.play_time = this.calculateCurrentValue(this.audio.duration - this.audio.currentTime)
this.play_time = this.calculateCurrentValue(this.audio.duration - this.audio.currentTime)
;
}, 1000);
}).catch((e) => {
// 失败
console.log('Operation is too fast, audio play fails')
})
}
},
voice_pause() {
...
...
src/components/InfoWindowWarn.vue
View file @
ef2d740
...
...
@@ -229,7 +229,10 @@ export default {
this.is_play = false;
},
goTo(url) {
location.href = url;
console.warn(url);
// if (url) {
// location.href = url;
// }
},
handleTitle(index) {
this.isActive = index;
...
...
Please
register
or
login
to post a comment