|
@@ -2,13 +2,15 @@
|
|
|
import {reactive, ref} from 'vue'
|
|
|
import moment from 'moment';
|
|
|
import SelfList from '@/components/SelfList.vue'
|
|
|
-import {apiSpecialColumnDetail,apiSpecialColumnReportList} from '@/api/report'
|
|
|
+import {apiSpecialColumnDetail,apiSpecialColumnReportList,apiSpecialColumnComment} from '@/api/report'
|
|
|
import { useRoute, useRouter } from 'vue-router';
|
|
|
+import { useStore } from 'vuex';
|
|
|
|
|
|
const route=useRoute()
|
|
|
const router=useRouter()
|
|
|
+const store=useStore()
|
|
|
|
|
|
-let nav=ref('专栏目录')
|
|
|
+let nav=ref('专栏介绍')
|
|
|
|
|
|
let info=ref(null)//专栏详情
|
|
|
const getSpecialColumnDetail=async ()=>{
|
|
@@ -20,6 +22,16 @@ const getSpecialColumnDetail=async ()=>{
|
|
|
}
|
|
|
getSpecialColumnDetail()
|
|
|
|
|
|
+// 客户评价
|
|
|
+let commentList=ref([])
|
|
|
+const getComment=async ()=>{
|
|
|
+ const res=await apiSpecialColumnComment({classify_id_second:Number(route.query.columnId)})
|
|
|
+ if(res.code===200){
|
|
|
+ commentList.value=res.data
|
|
|
+ }
|
|
|
+}
|
|
|
+getComment()
|
|
|
+
|
|
|
|
|
|
// 获取报告列表
|
|
|
let listState=reactive({
|
|
@@ -64,32 +76,52 @@ const goReportDetail=(item)=>{
|
|
|
}
|
|
|
|
|
|
|
|
|
+//播放音频
|
|
|
+const handlePlayAudio=(item)=>{
|
|
|
+ if(store.state.audioData.reportId==item.report_id){
|
|
|
+ if(store.state.audioData.paused){
|
|
|
+ store.state.audioData.INS.play()
|
|
|
+ }else{
|
|
|
+ store.state.audioData.INS.pause()
|
|
|
+ }
|
|
|
+ return
|
|
|
+ }
|
|
|
+ store.commit('addAudio',{
|
|
|
+ list:[{name:item.video_name,url:item.video_url,time:item.video_play_seconds}],
|
|
|
+ reportId:item.report_id,
|
|
|
+ index:0
|
|
|
+ })
|
|
|
+}
|
|
|
+
|
|
|
+
|
|
|
|
|
|
</script>
|
|
|
|
|
|
<template>
|
|
|
<div class="specialColumn-detail-page" v-if="info">
|
|
|
- <div class="top-abstract-box" >
|
|
|
+ <div class="top-user-box" >
|
|
|
<div class="title">{{info.classify_name_second}}</div>
|
|
|
- <p class="abstract">{{info.abstract}}</p>
|
|
|
+ <div class="flex-col-center">
|
|
|
+ <img class="avatar" :src="info.avatar_img_url" alt="">
|
|
|
+ <div>
|
|
|
+ <div>
|
|
|
+ <span class="name">{{info.report_author}}</span>
|
|
|
+ <span class="vip" v-if="info.vip_title">{{info.vip_title}}</span>
|
|
|
+ </div>
|
|
|
+ <p>{{info.author_descript}}</p>
|
|
|
+ </div>
|
|
|
+
|
|
|
+ </div>
|
|
|
</div>
|
|
|
<div class="main-box">
|
|
|
<div class="nav-box">
|
|
|
- <span :class="nav==='分析师介绍'&&'active'" @click="nav='分析师介绍'">分析师介绍</span>
|
|
|
+ <span :class="nav==='专栏介绍'&&'active'" @click="nav='专栏介绍'">专栏介绍</span>
|
|
|
<span :class="nav==='专栏目录'&&'active'" @click="nav='专栏目录'">专栏目录</span>
|
|
|
<span :class="nav==='客户评价'&&'active'" @click="nav='客户评价'">客户评价</span>
|
|
|
</div>
|
|
|
- <!-- 分析师介绍模块 -->
|
|
|
- <div class="user-info-wrap" v-if="nav==='分析师介绍'">
|
|
|
- <div class="flex user-box">
|
|
|
- <img class="avatar" :src="info.avatar_img_url" alt="">
|
|
|
- <div>
|
|
|
- <div>
|
|
|
- <span class="name">{{info.report_author}}</span>
|
|
|
- <span class="vip" v-if="info.vip_title">{{info.vip_title}}</span>
|
|
|
- </div>
|
|
|
- </div>
|
|
|
- </div>
|
|
|
+ <!-- 专栏介绍模块 -->
|
|
|
+ <div class="introduce-wrap" v-if="nav==='专栏介绍'">
|
|
|
+ <p>{{info.abstract}}</p>
|
|
|
</div>
|
|
|
<!-- 专栏报告模块 -->
|
|
|
<template v-if="nav==='专栏目录'">
|
|
@@ -118,7 +150,10 @@ const goReportDetail=(item)=>{
|
|
|
<div class="des" v-html="item.abstract"></div>
|
|
|
<div class="time">{{moment(item.publish_time).format('YYYY.MM.DD HH:mm')}}</div>
|
|
|
</div>
|
|
|
- <div class="global-plain-btn audio-btn">立即播放</div>
|
|
|
+ <div
|
|
|
+ class="global-plain-btn audio-btn"
|
|
|
+ @click.stop="handlePlayAudio(item)"
|
|
|
+ >{{$store.state.audioData.reportId==item.report_id?$store.state.audioData.paused?'已暂停':'播放中':'立即播放'}}</div>
|
|
|
</div>
|
|
|
</div>
|
|
|
</SelfList>
|
|
@@ -129,13 +164,48 @@ const goReportDetail=(item)=>{
|
|
|
|
|
|
<style lang="scss" scoped>
|
|
|
.specialColumn-detail-page{
|
|
|
- .top-abstract-box{
|
|
|
+ .top-user-box{
|
|
|
+ height: 230px;
|
|
|
+ background-image: url('@/assets/bg-1.png');
|
|
|
+ background-size: cover;
|
|
|
+ background-repeat: no-repeat;
|
|
|
+ padding-top: 40px;
|
|
|
+ padding-left: 75px;
|
|
|
.title{
|
|
|
- font-size: 28px;
|
|
|
- margin-bottom: 16px;
|
|
|
+ font-size: 32px;
|
|
|
+ font-weight: bold;
|
|
|
+ margin-bottom: 18px;
|
|
|
}
|
|
|
- .abstract{
|
|
|
- line-height: 2;
|
|
|
+ .avatar{
|
|
|
+ width: 90px;
|
|
|
+ height: 90px;
|
|
|
+ border-radius: 50%;
|
|
|
+ object-fit: cover;
|
|
|
+ margin-right: 13px;
|
|
|
+ }
|
|
|
+ .name{
|
|
|
+ font-size: 20px;
|
|
|
+ font-weight: bold;
|
|
|
+ margin-right: 10px;
|
|
|
+ }
|
|
|
+ .vip{
|
|
|
+ background-color: #FAF7EE;
|
|
|
+ font-size: 14px;
|
|
|
+ height: 24px;
|
|
|
+ line-height: 24px;
|
|
|
+ padding: 0 10px;
|
|
|
+ border-radius: 23px;
|
|
|
+ &::before{
|
|
|
+ content: '';
|
|
|
+ display: inline-block;
|
|
|
+ width: 15px;
|
|
|
+ height: 15px;
|
|
|
+ background-image: url('@/assets/tag.png');
|
|
|
+ background-size: cover;
|
|
|
+ position: relative;
|
|
|
+ top: 2px;
|
|
|
+ margin-right: 3px;
|
|
|
+ }
|
|
|
}
|
|
|
}
|
|
|
|
|
@@ -169,42 +239,10 @@ const goReportDetail=(item)=>{
|
|
|
}
|
|
|
}
|
|
|
|
|
|
- .user-info-wrap{
|
|
|
- margin-top: 40px;
|
|
|
- .user-box{
|
|
|
- align-items: center;
|
|
|
- .avatar{
|
|
|
- width: 90px;
|
|
|
- height: 90px;
|
|
|
- object-fit: cover;
|
|
|
- display: block;
|
|
|
- margin-right: 18px;
|
|
|
- }
|
|
|
- .name{
|
|
|
- font-size: 20px;
|
|
|
- font-weight: bold;
|
|
|
- margin-right: 10px;
|
|
|
- }
|
|
|
- .vip{
|
|
|
- background-color: #FAF7EE;
|
|
|
- font-size: 14px;
|
|
|
- height: 24px;
|
|
|
- line-height: 24px;
|
|
|
- padding: 0 10px;
|
|
|
- border-radius: 23px;
|
|
|
- &::before{
|
|
|
- content: '';
|
|
|
- display: inline-block;
|
|
|
- width: 15px;
|
|
|
- height: 15px;
|
|
|
- background-image: url('@/assets/tag.png');
|
|
|
- background-size: cover;
|
|
|
- position: relative;
|
|
|
- top: 2px;
|
|
|
- margin-right: 3px;
|
|
|
- }
|
|
|
- }
|
|
|
- }
|
|
|
+ .introduce-wrap{
|
|
|
+ font-size: 18px;
|
|
|
+ color: #666;
|
|
|
+ line-height: 34px;
|
|
|
}
|
|
|
|
|
|
.report-list{
|