hookehuyr

fix

......@@ -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() {
......
......@@ -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;
......