|
|
@@ -290,18 +290,24 @@ export default {
|
|
|
},
|
|
|
// 点击播放
|
|
|
handleChangeTime(mp3, time, edTime, type, index) {
|
|
|
- this.mp3Url = mp3;
|
|
|
- this.playIndex = index;
|
|
|
- if (time === undefined) {
|
|
|
- time = 0;
|
|
|
- edTime = 100000;
|
|
|
+ if (this.oldSrc === mp3 && this.playIndex === index) {
|
|
|
+ // 点的是同一个播放按钮
|
|
|
+ this.$refs.audioLine.PlayAudio();
|
|
|
+ } else {
|
|
|
+ this.oldSrc = mp3;
|
|
|
+ this.mp3Url = mp3;
|
|
|
+ this.playIndex = index;
|
|
|
+ if (time === undefined) {
|
|
|
+ time = 0;
|
|
|
+ edTime = 100000;
|
|
|
+ }
|
|
|
+ this.$nextTick(() => {
|
|
|
+ this.$refs.audioLine.onTimeupdateTime(time / 1000, true);
|
|
|
+ this.ed = edTime;
|
|
|
+ this.type = type;
|
|
|
+ this.stopAudioS = true;
|
|
|
+ });
|
|
|
}
|
|
|
- this.$nextTick(() => {
|
|
|
- this.$refs.audioLine.onTimeupdateTime(time / 1000, true);
|
|
|
- this.ed = edTime;
|
|
|
- this.type = type;
|
|
|
- this.stopAudioS = true;
|
|
|
- });
|
|
|
},
|
|
|
emptyEd() {
|
|
|
this.ed = null;
|