|
@@ -1,15 +1,29 @@
|
|
|
<script setup>
|
|
|
-import { computed, ref, onMounted,watch } from "vue";
|
|
|
+import { computed, ref, onMounted,watch,nextTick } from "vue";
|
|
|
import { apiGetReportDetail, apiGetWeekReportDetail } from "@/api/hzyb/report.js";
|
|
|
import { useRoute, useRouter,onBeforeRouteUpdate } from "vue-router";
|
|
|
import {ImagePreview } from 'vant'
|
|
|
import LeaveMessage from '../components/leaveMessage/index.vue'
|
|
|
+import {useWaterMark} from '../hooks/watermark'
|
|
|
const route = useRoute();
|
|
|
const router=useRouter()
|
|
|
document.title = "报告详情";
|
|
|
localStorage.setItem('hzyb-token',route.query.token)
|
|
|
localStorage.setItem('hzyb-userId',route.query.userId)
|
|
|
|
|
|
+//水印盒子
|
|
|
+let waterMarkBox=ref('')
|
|
|
+
|
|
|
+// 获取用户信息
|
|
|
+import {apiUserInfo} from '@/api/hzyb/user'
|
|
|
+const getUserInfo=async ()=>{
|
|
|
+ const { code,data }=await apiUserInfo({Authorization: localStorage.getItem('hzyb-token')})
|
|
|
+ if(code===200){
|
|
|
+ nextTick(()=>{
|
|
|
+ useWaterMark(data.mobile,waterMarkBox)
|
|
|
+ })
|
|
|
+ }
|
|
|
+}
|
|
|
|
|
|
let info = ref(null);
|
|
|
let topBg = ref(null)
|
|
@@ -32,6 +46,7 @@ const getDetail = async () => {
|
|
|
topBg.value = temTopBg.default
|
|
|
getList(res.data.research_report_type_info.research_report_id)
|
|
|
noAuth.value = false;
|
|
|
+ getUserInfo()
|
|
|
} else if (res.code == 400) {
|
|
|
noAuth.value = true;
|
|
|
}
|
|
@@ -122,6 +137,7 @@ onBeforeRouteUpdate(to => {
|
|
|
<div class="box" @click="showTips"></div>
|
|
|
</div>
|
|
|
<div class="content-wrap">
|
|
|
+ <div class="water-mark-box" ref="waterMarkBox" style="position: absolute;width:100%;height:100%;z-index: 1;opacity: 0.1;"></div>
|
|
|
<div class="top-box">
|
|
|
<h2>{{info.research_report_type_info.research_report_type_title}}</h2>
|
|
|
<span class="classify-box">
|
|
@@ -133,10 +149,10 @@ onBeforeRouteUpdate(to => {
|
|
|
v-for="item in info.research_report_type_content_list"
|
|
|
:key="item.sort"
|
|
|
>
|
|
|
- <h2 class="content-title">
|
|
|
+ <h2 class="content-title" style="position: relative;z-index: 5;">
|
|
|
{{ item.content_type ? item.content_type : "核心观点" }}
|
|
|
</h2>
|
|
|
- <div v-html="item.content" class="content-text"></div>
|
|
|
+ <div v-html="item.content" class="content-text" style="position: relative;z-index: 5;"></div>
|
|
|
</div>
|
|
|
</div>
|
|
|
<div class="footer-wrap">
|
|
@@ -169,6 +185,7 @@ onBeforeRouteUpdate(to => {
|
|
|
<LeaveMessage
|
|
|
:info="info"
|
|
|
@like_change="giveOrCancelLike"
|
|
|
+ v-if="info"
|
|
|
/>
|
|
|
|
|
|
<!-- 弹窗 -->
|
|
@@ -289,6 +306,7 @@ onBeforeRouteUpdate(to => {
|
|
|
z-index: 2;
|
|
|
padding: 40px 30px;
|
|
|
line-height: 1.7;
|
|
|
+ overflow: hidden;
|
|
|
:deep(a){
|
|
|
word-wrap: break-word;
|
|
|
}
|