|
@@ -5,7 +5,7 @@
|
|
|
<image :src="info.avatar_img_url" mode="aspectFill" class="avatar"/>
|
|
|
<view class="user-name">
|
|
|
<text>{{info.report_author}}</text>
|
|
|
- <text class="tag" v-if="vip_title">{{info.vip_title}}</text>
|
|
|
+ <text class="tag" v-if="info.vip_title">{{info.vip_title}}</text>
|
|
|
</view>
|
|
|
<view class="user-title">{{info.author_descript}}</view>
|
|
|
<view class="user-intro">{{info.abstract}}</view>
|
|
@@ -27,8 +27,8 @@
|
|
|
<view class="van-ellipsis tips">摘要:{{item.abstract}}</view>
|
|
|
<view class="time">{{item.publish_time|formatReportTime}}</view>
|
|
|
<view :class="['audio-box',!info.auth_ok&&'grey-audio-box']" @click.stop="handleClickAudio(item)">
|
|
|
- <image src="../static/audio.png" mode="aspectFill"/>
|
|
|
- <text>播放</text>
|
|
|
+ <image :src="curAudioReportId==item.report_id&&!curAudioPaused?'../static/audio-s.png':'../static/audio.png'" mode="aspectFill"/>
|
|
|
+ <text>{{curAudioReportId==item.report_id&&!curAudioPaused?'暂停':'播放'}}</text>
|
|
|
</view>
|
|
|
</view>
|
|
|
</view>
|
|
@@ -47,6 +47,12 @@ export default {
|
|
|
computed: {
|
|
|
showAudioPop(){//是否显示音频弹窗
|
|
|
return this.$store.state.report.audioData.show
|
|
|
+ },
|
|
|
+ curAudioReportId(){//当前播放的音频所属报告
|
|
|
+ return this.$store.state.report.audioData.reportId
|
|
|
+ },
|
|
|
+ curAudioPaused(){//当前音频是否暂停状态
|
|
|
+ return this.$store.state.report.audioData.paused
|
|
|
}
|
|
|
},
|
|
|
components: {
|
|
@@ -137,7 +143,20 @@ export default {
|
|
|
})
|
|
|
return
|
|
|
}
|
|
|
- this.$store.commit('addAudio', [{video_url:item.video_url,video_name:item.video_name,video_play_seconds:item.video_play_seconds}])
|
|
|
+ // 判断是否为同一个音频
|
|
|
+ if(this.$store.state.report.audioData.reportId==item.report_id){
|
|
|
+ if(this.globalBgMusic.paused){
|
|
|
+ this.globalBgMusic.play()
|
|
|
+ }else{
|
|
|
+ this.globalBgMusic.pause()
|
|
|
+ }
|
|
|
+ }else{
|
|
|
+ this.$store.commit('addAudio', {
|
|
|
+ list:[{video_url:item.video_url,video_name:item.video_name,video_play_seconds:item.video_play_seconds}],
|
|
|
+ reportId:item.report_id
|
|
|
+ })
|
|
|
+ }
|
|
|
+
|
|
|
}
|
|
|
}
|
|
|
}
|