|
@@ -1,5 +1,5 @@
|
|
|
<script setup>
|
|
|
-import {ref} from 'vue'
|
|
|
+import {onMounted, ref} from 'vue'
|
|
|
import moment from 'moment';
|
|
|
import AudioBox from './components/AudioBox.vue'
|
|
|
import {apiReportDetail} from '@/api/report'
|
|
@@ -31,6 +31,51 @@ const getReportDetail=async ()=>{
|
|
|
}
|
|
|
getReportDetail()
|
|
|
|
|
|
+
|
|
|
+let preViewImgs=ref([])
|
|
|
+let preViewImgIndex=ref(0)
|
|
|
+let showPreViewImg=ref(false)
|
|
|
+
|
|
|
+onMounted(()=>{
|
|
|
+ $(document).on('click', '.rich-content img',function(event) {
|
|
|
+ let imgArray = [];
|
|
|
+ let curImageSrc = $(this).attr('src');
|
|
|
+ let oParent = $(this).parent();
|
|
|
+ if (curImageSrc && !oParent.attr('href')) {
|
|
|
+ if(preViewImgs.value.length===0){
|
|
|
+ $('.rich-content img').each(function(index, el) {
|
|
|
+ let itemSrc = $(this).attr('src');
|
|
|
+ imgArray.push(itemSrc);
|
|
|
+ });
|
|
|
+ preViewImgs.value=imgArray
|
|
|
+ }
|
|
|
+ preViewImgIndex.value=preViewImgs.value.indexOf(curImageSrc)||0
|
|
|
+ showPreViewImg.value=true
|
|
|
+ }
|
|
|
+ })
|
|
|
+})
|
|
|
+
|
|
|
+// 设置章节列表tag颜色
|
|
|
+const getTagColor=(str)=>{
|
|
|
+ if( str.includes('多')||str.includes('强')||str.includes('反弹') ){
|
|
|
+ return "#DF6051";
|
|
|
+ }else if( str.includes('空')||str.includes('调整') ){
|
|
|
+ return "#6FC5B4";
|
|
|
+ }else{
|
|
|
+ return "#009fe6";
|
|
|
+ }
|
|
|
+}
|
|
|
+
|
|
|
+// 跳转章节详情
|
|
|
+const goChapterDetail=(item)=>{
|
|
|
+ router.push({
|
|
|
+ path:'/report/chapterdetail',
|
|
|
+ query:{
|
|
|
+ chapterId:item.report_chapter_id
|
|
|
+ }
|
|
|
+ })
|
|
|
+}
|
|
|
+
|
|
|
</script>
|
|
|
|
|
|
<template>
|
|
@@ -39,35 +84,22 @@ getReportDetail()
|
|
|
<div class="content-box">
|
|
|
<!-- 晨报、周报章节 -->
|
|
|
<div class="chapter-list-wrap" v-if="['晨报','周报'].includes(info.report_info.classify_name_first)">
|
|
|
- <div class="top-box" :style="'background-image:url(' + info.report_info.banner_url + ')'">
|
|
|
- <div class="title">{{info.report_info.classify_name_first}}</div>
|
|
|
- <div class="sub-title">{{info.report_info.title}}</div>
|
|
|
- <div class="flex top-bot">
|
|
|
- <div class="flex time-box">
|
|
|
- <div class="day">{{formatChapterTime(info.report_info.publish_time,'day')}}</div>
|
|
|
- <div>
|
|
|
- <div>{{formatChapterTime(info.report_info.publish_time,'week')}}</div>
|
|
|
- <div>{{formatChapterTime(info.report_info.publish_time,'year-month')}}</div>
|
|
|
- </div>
|
|
|
- </div>
|
|
|
- <div class="num">第{{info.report_info.stage}}期</div>
|
|
|
- </div>
|
|
|
- </div>
|
|
|
+ <div class="top-box" :style="'background-image:url(' + info.report_info.banner_url + ')'"></div>
|
|
|
<div class="list-box">
|
|
|
- <div class="flex item" v-for="item in chapterList" :key="item.report_chapter_id" @click="goChapterDetail(item)">
|
|
|
- <van-image class="img" :src="item.report_chapter_type_thumb" mode="aspectFill" />
|
|
|
+ <div class="flex item" v-for="item in info.report_chapter_list" :key="item.report_chapter_id" @click="goChapterDetail(item)">
|
|
|
+ <el-image class="img" :src="item.report_chapter_type_thumb" fit="cover" />
|
|
|
<div class="con">
|
|
|
<div class="title">
|
|
|
{{item.report_chapter_type_name}}
|
|
|
- <text class="tag" :style="{backgroundColor:getTagColor(tag)}" v-for="tag in item.trend.split(',')" :key="tag">{{tag}}</text>
|
|
|
+ <span class="tag" :style="{backgroundColor:getTagColor(tag)}" v-for="tag in item.trend.split(',')" :key="tag">{{tag}}</span>
|
|
|
</div>
|
|
|
<div class="van-multi-ellipsis--l2 sub-title">{{item.title}}</div>
|
|
|
- <div class="update-time">更新至:{{formatChapterTime(item.publish_time,'year-month-day')}}</div>
|
|
|
+ <div class="update-time">更新至:{{moment(item.publish_time).format('YYYY-MM-DD')}}</div>
|
|
|
</div>
|
|
|
</div>
|
|
|
</div>
|
|
|
<!-- 无权限 -->
|
|
|
- <div class="no-auth-box" v-if="!info.auth_ok">
|
|
|
+ <div class="no-auth-wrap" v-if="!info.auth_ok">
|
|
|
<img class="img" src="https://hzstatic.hzinsights.com/static/icon/hzyb/activity_no_auth.png" mode="widthFix" />
|
|
|
<div class="apply-box" v-if="info.permission_check.type=='apply'">
|
|
|
<div>您暂无权限查看报告,若想查看请申请开通</div>
|
|
@@ -76,7 +108,6 @@ getReportDetail()
|
|
|
<div class="apply-box" v-else>
|
|
|
<div>您暂无权限查看报告 </div>
|
|
|
<div>若想查看请联系对口销售:{{info.permission_check.name}}</div>
|
|
|
- <a class="btn" :href="'tel:'+info.permission_check.mobile" tag="div">立即联系</a>
|
|
|
</div>
|
|
|
</div>
|
|
|
</div>
|
|
@@ -108,13 +139,12 @@ getReportDetail()
|
|
|
</div>
|
|
|
<div class="apply-box" v-else>
|
|
|
<div>您暂无权限查看报告 </div>
|
|
|
- <div>若想查看请联系对口销售:{{info.permission_check.name}}</div>
|
|
|
- <a class="btn" :href="'tel:'+info.permission_check.mobile" tag="div">立即联系</a>
|
|
|
+ <div>若想查看请联系对口销售:{{info.permission_check.name}}--{{info.permission_check.mobile}}</div>
|
|
|
</div>
|
|
|
</div>
|
|
|
</div>
|
|
|
</div>
|
|
|
- <div class="right-aside-box">
|
|
|
+ <div class="right-aside-box" v-if="info.auth_ok">
|
|
|
<div class="fix-top">
|
|
|
<div class="share-box">
|
|
|
<div class="label">分享</div>
|
|
@@ -151,6 +181,14 @@ getReportDetail()
|
|
|
</div>
|
|
|
</div>
|
|
|
</div>
|
|
|
+
|
|
|
+ <!-- 图片预览 -->
|
|
|
+ <el-image-viewer
|
|
|
+ v-if="showPreViewImg"
|
|
|
+ :initial-index="preViewImgIndex"
|
|
|
+ @close="showPreViewImg=false"
|
|
|
+ :url-list="preViewImgs"
|
|
|
+ />
|
|
|
</template>
|
|
|
|
|
|
<style lang="scss" scoped>
|
|
@@ -217,62 +255,40 @@ getReportDetail()
|
|
|
}
|
|
|
}
|
|
|
}
|
|
|
+ .no-auth-wrap{
|
|
|
+ text-align: center;
|
|
|
+ color: #F3A52F;
|
|
|
+ margin-top: -140px;
|
|
|
+ padding-top: 140px;
|
|
|
+ min-height: 200px;
|
|
|
+ background: linear-gradient(360deg, #FFFFFF 60%, rgba(255, 255, 255, 0) 88%);
|
|
|
+ .btn{
|
|
|
+ width: 218px;
|
|
|
+ margin-left: auto;
|
|
|
+ margin-right: auto;
|
|
|
+ margin-top: 20px;
|
|
|
+ }
|
|
|
+ }
|
|
|
|
|
|
.chapter-list-wrap{
|
|
|
.top-box{
|
|
|
- height: 418px;
|
|
|
+ height: 140px;
|
|
|
background-color: rgba($color: #000000, $alpha: 0.7);
|
|
|
background-size: cover;
|
|
|
- color: #fff;
|
|
|
position: relative;
|
|
|
- .title{
|
|
|
- text-align: center;
|
|
|
- font-size: 34px;
|
|
|
- font-weight: 600;
|
|
|
- padding-top: 78px;
|
|
|
- }
|
|
|
- .sub-title{
|
|
|
- font-size: 32px;
|
|
|
- text-align: center;
|
|
|
- width: 70%;
|
|
|
- margin-left: auto;
|
|
|
- margin-right: auto;
|
|
|
- }
|
|
|
- .top-bot{
|
|
|
- position: absolute;
|
|
|
- bottom: 70px;
|
|
|
- left: 34px;
|
|
|
- right: 34px;
|
|
|
- justify-content: space-between;
|
|
|
- align-items: flex-end;
|
|
|
- .time-box{
|
|
|
- align-items: center;
|
|
|
- font-size: 24px;
|
|
|
- .day{
|
|
|
- font-size: 32px;
|
|
|
- border-right: 1px solid #fff;
|
|
|
- padding-right: 15px;
|
|
|
- margin-right: 15px;
|
|
|
- }
|
|
|
- }
|
|
|
-
|
|
|
- }
|
|
|
+ margin-bottom: 20px;
|
|
|
}
|
|
|
.list-box{
|
|
|
- margin-top: -50px;
|
|
|
- border-top-left-radius: 40px;
|
|
|
- border-top-right-radius: 40px;
|
|
|
min-height: 100px;
|
|
|
background-color: #fff;
|
|
|
position: relative;
|
|
|
- z-index: 2;
|
|
|
.item{
|
|
|
- padding: 30px 34px;
|
|
|
+ align-items: center;
|
|
|
+ padding: 20px 0;
|
|
|
border-bottom: 1px solid #E5E5E5;
|
|
|
.img{
|
|
|
- width: 104px;
|
|
|
- height: 104px;
|
|
|
- // background-color: #f5f5f5;
|
|
|
+ width: 55px;
|
|
|
+ height: 55px;
|
|
|
flex-shrink: 0;
|
|
|
margin-right: 20px;
|
|
|
}
|
|
@@ -280,31 +296,29 @@ getReportDetail()
|
|
|
flex: 1;
|
|
|
position: relative;
|
|
|
.title{
|
|
|
- font-size: 28px;
|
|
|
- color: #57768D;
|
|
|
+ margin-bottom: 8px;
|
|
|
font-weight: bold;
|
|
|
- margin-bottom: 5px;
|
|
|
.tag{
|
|
|
- font-size: 20px;
|
|
|
+ font-size: 12px;
|
|
|
color: #fff;
|
|
|
font-weight: normal;
|
|
|
display: inline-block;
|
|
|
background-color: #1E88E5;
|
|
|
- line-height: 37px;
|
|
|
+ line-height: 20px;
|
|
|
padding: 0 6px;
|
|
|
border-radius: 4px;
|
|
|
margin-left: 10px;
|
|
|
}
|
|
|
}
|
|
|
.sub-title{
|
|
|
- color: #999;
|
|
|
+ color: #333;
|
|
|
}
|
|
|
.update-time{
|
|
|
position: absolute;
|
|
|
top: 0;
|
|
|
right: 0;
|
|
|
- color: #D4D4D4;
|
|
|
- font-size: 20px;
|
|
|
+ color: #999999;
|
|
|
+ font-size: 14px;
|
|
|
}
|
|
|
}
|
|
|
}
|