|
@@ -45,7 +45,7 @@
|
|
|
></image>
|
|
|
</view>
|
|
|
<view class="is-paly-card" @click="handleChangePlayStatus">
|
|
|
- <image v-if="play" src="https://hzchart.oss-cn-shanghai.aliyuncs.com/new_cygx/suspend_play.png"></image>
|
|
|
+ <image v-if="playImg" src="https://hzchart.oss-cn-shanghai.aliyuncs.com/new_cygx/suspend_play.png"></image>
|
|
|
<image v-else src="https://hzchart.oss-cn-shanghai.aliyuncs.com/new_cygx/play_circle_filled.png"></image>
|
|
|
</view>
|
|
|
<view>
|
|
@@ -58,7 +58,7 @@
|
|
|
></image>
|
|
|
</view>
|
|
|
<view class="speed-button global_content_center play-list-content" @click="showTabulation = true">
|
|
|
- <van-icon name="bars" size="28" />
|
|
|
+ <image src="https://hzchart.oss-cn-shanghai.aliyuncs.com/new_cygx/paly_list_play.png"></image>
|
|
|
</view>
|
|
|
</view>
|
|
|
</view>
|
|
@@ -69,7 +69,7 @@
|
|
|
<view class="play-li-box">
|
|
|
<view class="play-li" v-for="(item, index) in playlistData" :key="item.indexId" @click="palyHandler(item)">
|
|
|
<view class="item-content-play-list">
|
|
|
- <view class="text_oneLine play-li-name">{{ item.Name }}</view>
|
|
|
+ <view :class="['text_oneLine', 'play-li-name', audioInit.indexId == item.indexId && 'active-play-li-name']">{{ item.Name }}</view>
|
|
|
<image v-if="audioInit.indexId == item.indexId" class="play_audio" src="https://hzchart.oss-cn-shanghai.aliyuncs.com/new_cygx/play_audio.png"></image>
|
|
|
</view>
|
|
|
<view class="delete_play">
|
|
@@ -107,7 +107,7 @@ export default {
|
|
|
audioTime: 0, //当前音频总时长
|
|
|
title: "", //当前音频标题
|
|
|
activityTitle: "", //当前活动标题
|
|
|
- play: false,
|
|
|
+ playImg: false,
|
|
|
isosName: "",
|
|
|
palyTimeout: null,
|
|
|
palyTime: 0,
|
|
@@ -119,6 +119,7 @@ export default {
|
|
|
],
|
|
|
isRecord: true, //是否记录播放
|
|
|
showTabulation: false,
|
|
|
+ isCommunication: false,
|
|
|
};
|
|
|
},
|
|
|
computed: {
|
|
@@ -171,6 +172,10 @@ export default {
|
|
|
this.isosName = res.osName;
|
|
|
},
|
|
|
});
|
|
|
+ uni.$on("play-list-emit", () => {
|
|
|
+ this.showTabulation = true;
|
|
|
+ this.isCommunication = true;
|
|
|
+ });
|
|
|
},
|
|
|
methods: {
|
|
|
//点击隐藏事件
|
|
@@ -197,7 +202,7 @@ export default {
|
|
|
this.title = curAudio.Name ? curAudio.Name.replace(/<\/?font.*?>/g, "") : "";
|
|
|
let activityTitle = this.$store.state.audioBg.activityTitle;
|
|
|
this.activityTitle = activityTitle ? activityTitle.replace(/<\/?font.*?>/g, "") : "";
|
|
|
- this.play = !this.globalBgAudioManager.paused;
|
|
|
+ this.playImg = !this.globalBgAudioManager.paused;
|
|
|
this.listenAudio();
|
|
|
},
|
|
|
//音频播放事件
|
|
@@ -211,7 +216,7 @@ export default {
|
|
|
this.palyTime++;
|
|
|
}, 1000);
|
|
|
}
|
|
|
- this.play = true;
|
|
|
+ this.playImg = true;
|
|
|
this.$store.commit("audioBg/updateAudioPause", false);
|
|
|
this.isRecord = true;
|
|
|
});
|
|
@@ -219,19 +224,19 @@ export default {
|
|
|
this.globalBgAudioManager.onPause(() => {
|
|
|
this.backAudioPlay();
|
|
|
clearInterval(this.palyTimeout);
|
|
|
- this.play = false;
|
|
|
+ this.playImg = false;
|
|
|
this.$store.commit("audioBg/updateAudioPause", true);
|
|
|
});
|
|
|
// 音频停止
|
|
|
this.globalBgAudioManager.onStop(() => {
|
|
|
+ this.showTabulation = false;
|
|
|
this.backAudioPlay();
|
|
|
clearInterval(this.palyTimeout);
|
|
|
this.$emit("update:showAudioPop", false);
|
|
|
- if (this.isosName == "ios") {
|
|
|
- this.play = false;
|
|
|
- this.$store.commit("audioBg/removeAudio");
|
|
|
+ this.playImg = false;
|
|
|
+ this.$store.commit("audioBg/removeAudio");
|
|
|
+ if (this.isosName !== "ios") {
|
|
|
} else {
|
|
|
- this.play = false;
|
|
|
this.$store.commit("audioBg/updateAudioPause", true);
|
|
|
}
|
|
|
});
|
|
@@ -331,15 +336,14 @@ export default {
|
|
|
// 关闭播放列表
|
|
|
onCloseHandler() {
|
|
|
this.showTabulation = false;
|
|
|
+ if (this.isCommunication) {
|
|
|
+ this.isCommunication = false;
|
|
|
+ this.isShowMaskHandler();
|
|
|
+ }
|
|
|
},
|
|
|
// 点击了播放列表
|
|
|
palyHandler(item) {
|
|
|
if (this.audioInit.indexId == item.indexId) {
|
|
|
- if (this.globalBgAudioManager.paused) {
|
|
|
- this.globalBgAudioManager.play();
|
|
|
- } else {
|
|
|
- this.globalBgAudioManager.pause();
|
|
|
- }
|
|
|
} else {
|
|
|
this.playlistDataInit(item);
|
|
|
}
|
|
@@ -391,11 +395,13 @@ export default {
|
|
|
},
|
|
|
// 点击删除列表
|
|
|
removeAudioListHandler(item, index) {
|
|
|
+ const indexKey = this.playlistData.findIndex((key) => key.indexId === this.audioInit.indexId);
|
|
|
let list = this.playlistData.filter((_) => _.indexId != item.indexId);
|
|
|
this.$store.commit("audioJoinPlaylist/removeAudio", { list });
|
|
|
- if (index === this.playlistData.length) {
|
|
|
+ if (index === this.playlistData.length && indexKey === index) {
|
|
|
this.globalBgAudioManager.stop();
|
|
|
- } else {
|
|
|
+ } else if (indexKey < index) {
|
|
|
+ } else if (indexKey === index) {
|
|
|
this.playlistDataInit(this.playlistData[index]);
|
|
|
}
|
|
|
},
|
|
@@ -425,7 +431,7 @@ export default {
|
|
|
font-size: 30rpx;
|
|
|
font-weight: 500;
|
|
|
margin-bottom: 35rpx;
|
|
|
- padding-right: 30rpx;
|
|
|
+ padding-right: 50rpx;
|
|
|
.icon-cross {
|
|
|
position: absolute;
|
|
|
right: 0;
|
|
@@ -501,7 +507,14 @@ export default {
|
|
|
font-size: 30rpx;
|
|
|
}
|
|
|
.play-list-content {
|
|
|
+ display: flex;
|
|
|
+ align-items: center;
|
|
|
+ justify-content: center;
|
|
|
width: 64rpx;
|
|
|
+ image {
|
|
|
+ width: 48rpx;
|
|
|
+ height: 48rpx;
|
|
|
+ }
|
|
|
}
|
|
|
}
|
|
|
}
|
|
@@ -515,8 +528,11 @@ export default {
|
|
|
padding-left: 30rpx;
|
|
|
}
|
|
|
.play-li-box {
|
|
|
+ height: 880rpx;
|
|
|
+ overflow: hidden;
|
|
|
margin-top: 35rpx;
|
|
|
border-top: 1rpx solid #dcdfe6;
|
|
|
+ overflow-y: auto;
|
|
|
}
|
|
|
.play-li {
|
|
|
display: flex;
|
|
@@ -543,6 +559,9 @@ export default {
|
|
|
.play-li-name {
|
|
|
display: inline-block;
|
|
|
}
|
|
|
+ .active-play-li-name {
|
|
|
+ color: $uni-color-new;
|
|
|
+ }
|
|
|
.play_audio {
|
|
|
display: inline-block;
|
|
|
width: 36rpx;
|