|
@@ -1,6 +1,6 @@
|
|
|
<template>
|
|
|
<view class="varietyauth-report-list">
|
|
|
- <van-sticky style="background: #fff">
|
|
|
+
|
|
|
<view class="top-variety-box">
|
|
|
<view class="first-nav">
|
|
|
<text
|
|
@@ -19,7 +19,6 @@
|
|
|
>{{item.chart_permission_name}}</text>
|
|
|
</view>
|
|
|
</view>
|
|
|
- </van-sticky>
|
|
|
<view class="report-empty-box" v-if="finished&&list.length==0">
|
|
|
<image :src="globalImgUrls.chartEmpty" mode="widthFix" />
|
|
|
<view>暂无报告</view>
|
|
@@ -36,14 +35,76 @@
|
|
|
</view>
|
|
|
</view>
|
|
|
</view>
|
|
|
+
|
|
|
+
|
|
|
+ <!-- 音频弹窗 -->
|
|
|
+ <audioBox v-if="showAudioPop"></audioBox>
|
|
|
+
|
|
|
+ <!-- 分享海报 -->
|
|
|
+ <sharePoster
|
|
|
+ :style="{bottom:'190rpx'}"
|
|
|
+ :shareData="{
|
|
|
+ type:'report_list',
|
|
|
+ code_page:'pages-report/reportForVariety/list',
|
|
|
+ code_scene:code_scene,
|
|
|
+ data:shareParams
|
|
|
+ }"></sharePoster>
|
|
|
</view>
|
|
|
</template>
|
|
|
|
|
|
<script>
|
|
|
import {apiGetSceneToParams} from '@/api/common'
|
|
|
-import {apiGoodsPermissionList} from '@/api/report'
|
|
|
+import {apiGoodsPermissionList,apiReportListForVariety} from '@/api/report'
|
|
|
+import audioBox from '../components/audioBox.vue'
|
|
|
const moment=require('@/utils/moment-with-locales.min')
|
|
|
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
|
|
|
+ },
|
|
|
+ shareParams(){
|
|
|
+ let obj={
|
|
|
+ list_title:this.classifyName,
|
|
|
+ img_1:'',
|
|
|
+ title_1:'',
|
|
|
+ abstract_1:'',
|
|
|
+ abstract_1_style:'',
|
|
|
+ time_1:'',
|
|
|
+ img_2:'',
|
|
|
+ title_2:'',
|
|
|
+ abstract_2:'',
|
|
|
+ abstract_2_style:'',
|
|
|
+ time_2:'',
|
|
|
+ }
|
|
|
+ if(this.list[0]){
|
|
|
+ obj.img_1=this.list[0].report_img_url
|
|
|
+ obj.title_1=this.list[0].title
|
|
|
+ obj.abstract_1=this.list[0].classify_name_second
|
|
|
+ obj.time_1=`${this.list[0].stage}期 | ${moment(this.list[0].publish_time).format('YYYY.MM.DD')}`
|
|
|
+ obj.abstract_1_style=this.list[0].classify_name_second?'':'display:none'
|
|
|
+ }
|
|
|
+ if(this.list[1]){
|
|
|
+ obj.img_2=this.list[1].report_img_url
|
|
|
+ obj.title_2=this.list[1].title
|
|
|
+ obj.abstract_2=this.list[1].classify_name_second
|
|
|
+ obj.time_2=`${this.list[1].stage}期 | ${moment(this.list[1].publish_time).format('YYYY.MM.DD')}`
|
|
|
+ obj.abstract_2_style=this.list[1].classify_name_second?'':'display:none'
|
|
|
+ }
|
|
|
+ return obj
|
|
|
+ },
|
|
|
+ code_scene(){
|
|
|
+ return JSON.stringify({classifyId:this.classifyId,classifyName:this.classifyName})
|
|
|
+ }
|
|
|
+ },
|
|
|
+ components: {
|
|
|
+ audioBox
|
|
|
+ },
|
|
|
data() {
|
|
|
return {
|
|
|
classifyId:0,
|
|
@@ -124,8 +185,47 @@ export default {
|
|
|
},
|
|
|
|
|
|
async getList(){
|
|
|
+ const res=await apiReportListForVariety({
|
|
|
+ chart_permission_id:Number(this.secVarietyId),
|
|
|
+ current_index:this.page,
|
|
|
+ page_size:this.pageSize
|
|
|
+ })
|
|
|
+ if(res.code===200){
|
|
|
+ this.list=[...this.list,...res.data.list]
|
|
|
+ this.finished=res.data.paging.is_end
|
|
|
+ }
|
|
|
+ },
|
|
|
|
|
|
- }
|
|
|
+ // 跳转报告详情
|
|
|
+ goReportDetail(item){
|
|
|
+ if(['晨报','周报'].includes(item.classify_name_first)){
|
|
|
+ uni.navigateTo({url: `/pages-report/chapterDetail?chapterId=${item.report_chapter_id}`})
|
|
|
+ }else{
|
|
|
+ uni.navigateTo({url:'/pages-report/reportDetail?reportId='+item.report_id})
|
|
|
+ }
|
|
|
+ },
|
|
|
+
|
|
|
+ handleClickAudio(item){
|
|
|
+ if(!item.auth_ok) return
|
|
|
+ if(!item.video_list||item.video_list.length==0){
|
|
|
+ uni.showToast({
|
|
|
+ title: '暂无音频',
|
|
|
+ icon: 'none'
|
|
|
+ })
|
|
|
+ return
|
|
|
+ }
|
|
|
+ // 判断是否为同一个音频
|
|
|
+ if(this.$store.state.report.audioData.reportId==item.report_id){
|
|
|
+ if(this.globalBgMusic.paused){
|
|
|
+ this.globalBgMusic.play()
|
|
|
+ this.$store.commit('showPopAudio')
|
|
|
+ }else{
|
|
|
+ this.globalBgMusic.pause()
|
|
|
+ }
|
|
|
+ }else{
|
|
|
+ this.$store.commit('addAudio', {list:item.video_list,reportId:item.report_id})
|
|
|
+ }
|
|
|
+ },
|
|
|
},
|
|
|
}
|
|
|
</script>
|
|
@@ -141,6 +241,11 @@ page{
|
|
|
.top-variety-box{
|
|
|
padding: 40rpx 34rpx 0 34rpx;
|
|
|
box-shadow: 0px 4rpx 4rpx rgba(198, 198, 198, 0.25);
|
|
|
+ background-color: #fff;
|
|
|
+ position: sticky;
|
|
|
+ left: 0;
|
|
|
+ right: 0;
|
|
|
+ top: 0;
|
|
|
.first-nav-item{
|
|
|
display: inline-block;
|
|
|
min-width: 140rpx;
|