bding hai 1 ano
pai
achega
fe87331531

+ 11 - 4
activityPages/activityDetail/activityDetail.vue

@@ -393,7 +393,7 @@ export default {
   computed: {
     curVoiceId() {
       //当前正在播放的音频id
-      return this.$store.state.audioBg.activityId;
+      return this.$store.state.audioBg.indexId;
     },
     curAudioPaused() {
       //当前音频是否暂停状态
@@ -619,7 +619,7 @@ export default {
     },
     // 音频点击暂停播放
     audioPlayBack() {
-      if (this.$store.state.audioBg.activityId == this.detailData.ActivityId) {
+      if (this.$store.state.audioBg.indexId == this.detailData.ActivityId) {
         if (this.globalBgAudioManager.paused) {
           this.globalBgAudioManager.play();
         } else {
@@ -631,6 +631,10 @@ export default {
           indexId: this.detailData.ActivityId,
           activityId: this.detailData.ActivityId,
           activityTitle: this.detailData.ActivityName,
+          recordList: {
+            SourceId: this.detailData.ActivityId,
+            Type: 1,
+          },
         });
       }
     },
@@ -669,7 +673,10 @@ export default {
           indexId: this.detailData.ActivityId,
           activityId: this.detailData.ActivityId,
           activityTitle: this.detailData.ActivityName,
-          recordList: this.detailData,
+          recordList: {
+            SourceId: this.detailData.ActivityId,
+            Type: 1,
+          },
         });
       }
       this.$refs.childrenAudio.isRecord = false;
@@ -759,7 +766,7 @@ export default {
   },
   onShow() {
     this.getActivityDetail();
-
+    this.$store.commit("audioBg/parseIntAudio", false);
     this.$store.commit("setRouterReport", "活动详情");
   },
   /**

+ 62 - 20
activityPages/playBack/playBack.vue

@@ -60,12 +60,12 @@
               <view class="content-item-flex iten-buttom">
                 <view class="global_content_center" @click.stop="playBack(item)">
                   <image
-                    v-if="item.FileType == 1 && curVoiceId === list.Id && !curAudioPaused"
+                    v-if="item.FileType == 1 && curVoiceId === item.ActivityId && !curAudioPaused"
                     class="play-img"
                     src="https://hzchart.oss-cn-shanghai.aliyuncs.com/new_cygx/suspend_play_list.png"
                   ></image>
                   <image v-else class="play-img" src="https://hzchart.oss-cn-shanghai.aliyuncs.com/new_cygx/play-circle-filled.png"></image>
-                  {{ item.FileType == 1 && curVoiceId === list.Id && !curAudioPaused ? "暂停" : "播放" }}
+                  {{ item.FileType == 1 && curVoiceId === item.ActivityId && !curAudioPaused ? "暂停" : "播放" }}
                 </view>
                 <view v-if="item.FileType == 1" class="global_content_center" @click="joinPlaylist(item)">
                   <image class="play-list" src="https://hzchart.oss-cn-shanghai.aliyuncs.com/new_cygx/paly_list.png"></image>
@@ -88,8 +88,11 @@
 
       <!-- 所有自定义弹框 -->
       <modalDialog :isShowhasPermission="isShowhasPermission" :applyForIsShow="applyForIsShow" :jurisdictionList="jurisdictionList" :hasPermission="hasPermission" />
+      <view class="paly-list-image" v-if="playlistData.length > 0" @click="showAudioBoxPlayList">
+        <image src="https://hzchart.oss-cn-shanghai.aliyuncs.com/new_cygx/Joined_play_list.png"></image>
+      </view>
     </view>
-    <!-- <not-have-login v-else /> -->
+
     <Loading />
   </block>
 </template>
@@ -190,29 +193,55 @@ export default {
       return time;
     },
     // 加入播放列表
-    joinPlaylist(item) {
-      let recordList = {
-        Type: 1,
-        SourceId: item.ActivityId,
-      };
-      let dataList = {
-        Url: item.VoiceList.ResourceUrl,
-        Name: item.VoiceList.Name,
-        PlaySeconds: item.VoiceList.PlaySeconds,
-        indexId: item.ActivityId,
-        activityTitle: item.ActivityName,
-        recordList,
-      };
-      const playlist = this.$store.state.audioJoinPlaylist.playlist.some((key) => key.indexId === dataList.indexId);
-      if (!playlist) {
-        this.$store.commit("audioJoinPlaylist/addPlaylist", { dataList });
+    async joinPlaylist(item) {
+      if (!item.BackAudioPlay) {
+        const res = await activity.getActivityDetail({
+          ActivityId: item.ActivityId,
+        });
+        if (res.Ret === 200) {
+          item.BackAudioPlay = res.Data;
+        }
+      }
+      this.hasPermission = item.BackAudioPlay.HasPermission;
+      this.jurisdictionList.ActivityId = item.ActivityId;
+      if (this.hasPermission == 1) {
+        let recordList = {
+          Type: 1,
+          SourceId: item.ActivityId,
+        };
+        let dataList = {
+          Url: item.VoiceList.ResourceUrl,
+          Name: item.VoiceList.Name,
+          PlaySeconds: item.VoiceList.PlaySeconds,
+          indexId: item.ActivityId,
+          activityTitle: item.ActivityName,
+          recordList,
+        };
+        const playlist = this.$store.state.audioJoinPlaylist.playlist.some((key) => key.indexId === dataList.indexId);
+        if (!playlist) {
+          this.$store.commit("audioJoinPlaylist/addPlaylist", { dataList });
+        }
         uni.showToast({
           title: "已加入播放列表",
           icon: "success",
-          duration: 2000,
+          duration: 500,
         });
+      } else if (this.hasPermission == 2) {
+        this.jurisdictionList.SellerMobile = item.BackAudioPlay.SellerMobile;
+        this.jurisdictionList.SellerName = item.BackAudioPlay.SellerName;
+        this.jurisdictionList.PopupMsg = item.BackAudioPlay.PopupMsg;
+        this.isShowhasPermission = true;
+      } else if (this.hasPermission == 3 || this.hasPermission == 4 || this.hasPermission == 5) {
+        this.jurisdictionList.PopupMsg = item.BackAudioPlay.PopupMsg;
+        this.applyForIsShow = true;
       }
     },
+    // 展示播放列表
+    showAudioBoxPlayList() {
+      this.$store.commit("audioBg/parseIntAudio", true);
+      this.showAudioPop = true;
+      uni.$emit("play-list-emit", {});
+    },
   },
   onLoad() {
     this.getActivityList();
@@ -248,6 +277,18 @@ export default {
 .container-play-back {
   background-color: $uni-bg-color;
   padding-bottom: 30rpx;
+  .paly-list-image {
+    position: fixed;
+    right: 50rpx;
+    bottom: 150rpx;
+    z-index: 99;
+    width: 100rpx;
+    height: 100rpx;
+    image {
+      width: 100rpx;
+      height: 100rpx;
+    }
+  }
   .title-date {
     position: relative;
     .audio-back {
@@ -305,6 +346,7 @@ export default {
       margin-right: 6rpx;
     }
   }
+
   @import "../components/selectCss.scss";
   @import "@/components/activity/indexActivity.scss";
 }

+ 33 - 18
components/ItemComponent/roadshowItem.vue

@@ -14,12 +14,12 @@
     <view class="content-item-flex iten-buttom">
       <view class="global_content_center" @click.stop="handelPlay(list)">
         <image
-          v-if="(ist.Type == 1 || list.Type == 4) && curVoiceId === list.Id && !curAudioPaused"
+          v-if="(list.Type == 1 || list.Type == 4) && curVoiceId === list.SourceId && !curAudioPaused"
           class="play-img"
           src="https://hzchart.oss-cn-shanghai.aliyuncs.com/new_cygx/suspend_play_list.png"
         ></image>
         <image v-else class="play-img" src="https://hzchart.oss-cn-shanghai.aliyuncs.com/new_cygx/play-circle-filled.png"></image>
-        {{ (list.Type == 1 || list.Type == 4) && curVoiceId === list.Id && !curAudioPaused ? "暂停" : "播放" }}
+        {{ (list.Type == 1 || list.Type == 4) && curVoiceId === list.SourceId && !curAudioPaused ? "暂停" : "播放" }}
       </view>
       <view v-if="list.Type == 1 || list.Type == 4" class="global_content_center" @click="joinPlaylist(list)">
         <image class="play-list" src="https://hzchart.oss-cn-shanghai.aliyuncs.com/new_cygx/paly_list.png"></image>
@@ -97,7 +97,7 @@ export default {
       let content_item = null;
       if (item.SourceId) {
         content_item = {
-          ActivityId: item.SourceId,
+          SourceId: item.SourceId || item.ActivityId,
           PlaySeconds: item.PlaySeconds,
           ResourceUrl: item.ResourceUrl,
           Title: item.Title,
@@ -136,7 +136,7 @@ export default {
       this.curVideoId = 0;
       this.$store.commit("audioBg/parseIntAudio", true);
       // 判断是否为同一个音频
-      if (this.$store.state.audioBg.indexId == item.ActivityId) {
+      if (this.$store.state.audioBg.indexId == item.SourceId) {
         if (this.globalBgAudioManager.paused) {
           this.globalBgAudioManager.play();
         } else {
@@ -148,7 +148,7 @@ export default {
           Name: item.Title,
           PlaySeconds: +item.PlaySeconds,
         };
-        this.$store.commit("audioBg/addAudio", { list: VoiceList, indexId: item.ActivityId, activityTitle: item.Title, recordList: item });
+        this.$store.commit("audioBg/addAudio", { list: VoiceList, indexId: item.SourceId || item.ActivityId, activityTitle: item.Title, recordList: item });
       }
       this.$parent.showAudioPop = true;
     },
@@ -186,23 +186,38 @@ export default {
       }line-clamp: ${val};-webkit-line-clamp: ${val};text-overflow: -o-ellipsis-lastline;overflow: hidden;text-overflow: ellipsis;display: -webkit-box;-webkit-box-orient: vertical;word-wrap: break-word;word-break: break-all;">`;
     },
     // 加入播放列表
-    joinPlaylist(item) {
-      let dataList = {
-        Url: item.ResourceUrl,
-        Name: item.Title,
-        PlaySeconds: +item.PlaySeconds,
-        indexId: item.SourceId || item.ActivityId,
-        activityTitle: item.Title,
-        recordList: item,
-      };
-      const playlist = this.$store.state.audioJoinPlaylist.playlist.some((key) => key.indexId === dataList.indexId);
-      if (!playlist) {
-        this.$store.commit("audioJoinPlaylist/addPlaylist", { dataList });
+    async joinPlaylist(item) {
+      if (item.AuthInfo.HasPermission == 1) {
+        let dataList = {
+          Url: item.ResourceUrl,
+          Name: item.Title,
+          PlaySeconds: +item.PlaySeconds,
+          indexId: item.SourceId || item.ActivityId,
+          activityTitle: item.Title,
+          recordList: item,
+        };
+        const playlist = this.$store.state.audioJoinPlaylist.playlist.some((key) => key.indexId === dataList.indexId);
+        if (!playlist) {
+          this.$store.commit("audioJoinPlaylist/addPlaylist", { dataList });
+        }
         uni.showToast({
           title: "已加入播放列表",
           icon: "success",
-          duration: 2000,
+          duration: 500,
         });
+      } else {
+        this.hasPermission = item.AuthInfo.HasPermission;
+        this.jurisdictionList.ActivityId = item.Id;
+        this.jurisdictionList.isAudioVideo = item.Type;
+        if (this.hasPermission == 2) {
+          this.jurisdictionList.SellerMobile = item.AuthInfo.SellerMobile;
+          this.jurisdictionList.SellerName = item.AuthInfo.SellerName;
+          this.jurisdictionList.PopupMsg = item.AuthInfo.PopupMsg;
+          this.isShowhasPermission = true;
+        } else if (this.hasPermission == 3 || this.hasPermission == 4 || this.hasPermission == 5) {
+          this.jurisdictionList.PopupMsg = item.AuthInfo.PopupMsg;
+          this.applyForIsShow = true;
+        }
       }
     },
     // 播放时长的转换

+ 6 - 2
components/activity/mediaMixins.js

@@ -19,6 +19,10 @@ export default {
     showAudioBox() {
       return this.$store.state.audioBg.parseIntShow;
     },
+    // 播放列表数据
+    playlistData() {
+      return this.$store.state.audioJoinPlaylist.playlist;
+    },
   },
   methods: {
     //点击了回放
@@ -59,14 +63,14 @@ export default {
     audioPlayBack(item) {
       this.$store.commit("audioBg/parseIntAudio", true);
       // 判断是否为同一个音频
-      if (this.$store.state.audioBg.activityId == item.ActivityId) {
+      if (this.$store.state.audioBg.indexId == item.ActivityId) {
         if (this.globalBgAudioManager.paused) {
           this.globalBgAudioManager.play();
         } else {
           this.globalBgAudioManager.pause();
         }
       } else {
-        this.$store.commit("audioBg/addAudio", { list: item.VoiceList, indexId: item.ActivityId, activityId: item.ActivityId, activityTitle: item.ActivityName, recordList: item });
+        this.$store.commit("audioBg/addAudio", { list: item.VoiceList, indexId: item.ActivityId, activityId: item.ActivityId, activityTitle: item.VoiceList.Name, recordList: item });
       }
       this.showAudioPop = true;
     },

+ 38 - 19
components/audioModule/index.vue

@@ -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;

+ 24 - 1
pages/material/material.vue

@@ -100,6 +100,9 @@
     <view v-if="showAudioBox">
       <audioModule :showAudioPop.sync="showAudioPop" />
     </view>
+    <view class="paly-list-image" v-if="topTabsActive == 4 && playlistData.length > 0" @click="showAudioBoxPlayList">
+      <image src="https://hzchart.oss-cn-shanghai.aliyuncs.com/new_cygx/Joined_play_list.png"></image>
+    </view>
     <Loading />
   </view>
 </template>
@@ -202,6 +205,10 @@ export default {
     isMyChartCollection() {
       return this.topTabsActive == "3" && this.secondActive == 0;
     },
+    // 播放列表数据
+    playlistData() {
+      return this.$store.state.audioJoinPlaylist.playlist;
+    },
   },
   methods: {
     //点击顶部一级分类
@@ -537,6 +544,11 @@ export default {
           }) || [];
       }
     },
+    showAudioBoxPlayList() {
+      this.$store.commit("audioBg/parseIntAudio", true);
+      this.showAudioPop = true;
+      uni.$emit("play-list-emit", {});
+    },
   },
   onHide() {
     this.$store.commit("audioBg/parseIntAudio", false);
@@ -740,7 +752,18 @@ export default {
       }
     }
   }
-
+  .paly-list-image {
+    position: fixed;
+    right: 50rpx;
+    bottom: 150rpx;
+    z-index: 99;
+    width: 100rpx;
+    height: 100rpx;
+    image {
+      width: 100rpx;
+      height: 100rpx;
+    }
+  }
   /deep/.van-dropdown-menu {
     background-color: #fff;
     box-shadow: none !important;

+ 1 - 1
store/modules/audioBg.js

@@ -11,7 +11,7 @@ const audioModules = {
     curTime: 0, //当前正在播放的音频播放的时间
     activityTitle: "",
     multiple: 1, //倍数
-    parseIntShow: false, //
+    parseIntShow: true, //
     isDragSlide: false, //是否在拖动进度条
     isAudioEnded: false, //
     recordList: {}, //记录音频播放的数据