hookehuyr

fix

...@@ -93,25 +93,12 @@ export default { ...@@ -93,25 +93,12 @@ export default {
93 }, 93 },
94 infoWindow(val) { 94 infoWindow(val) {
95 if (val) { 95 if (val) {
96 - if (this.info?.details[this.isActive]['audio']) { // 实体有音频时 96 + if (this.info?.details.length && this.info?.details[this.isActive]['audio']) { // 实体有音频时
97 // 存放到pinia里面控制 97 // 存放到pinia里面控制
98 this.changeAudio(this.audio); 98 this.changeAudio(this.audio);
99 this.changeAudioStatus('pause'); 99 this.changeAudioStatus('pause');
100 // 加载录音 100 // 加载录音
101 - this.play_time = '01:49' 101 + this.play_time = this.info?.details[this.isActive]['audio_time']
102 - // this.audio.src = this.info?.details[this.isActive]['audio'];
103 - // let play_status = this.audio.play() // 播放
104 - // if (play_status) {
105 - // play_status.then(() => {
106 - // // 音频的播放需要耗时
107 - // this.is_play = false;
108 - // this.audio.pause();
109 - // this.play_time = this.getAudioTime(this.audio.duration)
110 - // }).catch((e) => {
111 - // // 失败
112 - // console.log('Operation is too fast, audio play fails')
113 - // })
114 - // }
115 } 102 }
116 } 103 }
117 }, 104 },
...@@ -210,14 +197,12 @@ export default { ...@@ -210,14 +197,12 @@ export default {
210 this.ind = 0 197 this.ind = 0
211 }, this.audio.duration * 1000) // audio.duration 为音频的时长单位为秒 198 }, this.audio.duration * 1000) // audio.duration 为音频的时长单位为秒
212 setInterval(() => { 199 setInterval(() => {
213 - this.play_time = this.calculateCurrentValue(this.audio.duration - this.audio.currentTime) 200 + this.play_time = this.calculateCurrentValue(this.audio.duration - this.audio.currentTime);
214 }, 1000); 201 }, 1000);
215 }).catch((e) => { 202 }).catch((e) => {
216 // 失败 203 // 失败
217 console.log('Operation is too fast, audio play fails') 204 console.log('Operation is too fast, audio play fails')
218 }) 205 })
219 -
220 -
221 } 206 }
222 }, 207 },
223 voice_pause() { 208 voice_pause() {
......
...@@ -229,7 +229,10 @@ export default { ...@@ -229,7 +229,10 @@ export default {
229 this.is_play = false; 229 this.is_play = false;
230 }, 230 },
231 goTo(url) { 231 goTo(url) {
232 - location.href = url; 232 + console.warn(url);
233 + // if (url) {
234 + // location.href = url;
235 + // }
233 }, 236 },
234 handleTitle(index) { 237 handleTitle(index) {
235 this.isActive = index; 238 this.isActive = index;
......