Showing
2 changed files
with
5 additions
and
0 deletions
| ... | @@ -272,6 +272,7 @@ var spotInfo = [ | ... | @@ -272,6 +272,7 @@ var spotInfo = [ |
| 272 | name: '观音殿', | 272 | name: '观音殿', |
| 273 | note: '', | 273 | note: '', |
| 274 | url: 'https://mp.weixin.qq.com/s/-b29FEPxZyE3Lu1KucmPcw', | 274 | url: 'https://mp.weixin.qq.com/s/-b29FEPxZyE3Lu1KucmPcw', |
| 275 | + audio: '', | ||
| 275 | }, | 276 | }, |
| 276 | ], | 277 | ], |
| 277 | }, | 278 | }, | ... | ... |
| ... | @@ -93,14 +93,17 @@ export default { | ... | @@ -93,14 +93,17 @@ 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 | // 存放到pinia里面控制 | 97 | // 存放到pinia里面控制 |
| 97 | this.changeAudio(this.audio); | 98 | this.changeAudio(this.audio); |
| 99 | + this.changeAudioStatus('pause'); | ||
| 98 | // 加载录音 | 100 | // 加载录音 |
| 99 | this.audio.src = this.info?.details[this.isActive]['audio']; | 101 | this.audio.src = this.info?.details[this.isActive]['audio']; |
| 100 | let play_status = this.audio.play() // 播放 | 102 | let play_status = this.audio.play() // 播放 |
| 101 | if (play_status) { | 103 | if (play_status) { |
| 102 | play_status.then(() => { | 104 | play_status.then(() => { |
| 103 | // 音频的播放需要耗时 | 105 | // 音频的播放需要耗时 |
| 106 | + this.is_play = false; | ||
| 104 | this.audio.pause(); | 107 | this.audio.pause(); |
| 105 | this.play_time = this.getAudioTime(this.audio.duration) | 108 | this.play_time = this.getAudioTime(this.audio.duration) |
| 106 | }).catch((e) => { | 109 | }).catch((e) => { |
| ... | @@ -109,6 +112,7 @@ export default { | ... | @@ -109,6 +112,7 @@ export default { |
| 109 | }) | 112 | }) |
| 110 | } | 113 | } |
| 111 | } | 114 | } |
| 115 | + } | ||
| 112 | }, | 116 | }, |
| 113 | audio_status (v) { | 117 | audio_status (v) { |
| 114 | if (v === 'pause') { | 118 | if (v === 'pause') { | ... | ... |
-
Please register or login to post a comment