|
@@ -139,7 +139,11 @@ async function handleCancelCollectReport() {
|
|
|
|
|
|
if(res.Ret !== 200) return
|
|
|
MessagePlugin.success('取消成功')
|
|
|
- info.value.IsCollected=false
|
|
|
+ if(route.query.chapterId) {
|
|
|
+ chapterInfo.value.IsCollected = false
|
|
|
+ }else {
|
|
|
+ info.value.IsCollected=false
|
|
|
+ }
|
|
|
}
|
|
|
|
|
|
|
|
@@ -172,12 +176,12 @@ onUnmounted(() => {
|
|
|
返回
|
|
|
</div>
|
|
|
|
|
|
- <div class="flex">
|
|
|
+ <div class="flex" v-if="!info.HasChapter||route.query.chapterId">
|
|
|
<div class="collect-icon">
|
|
|
- <svg-icon v-if="info?.IsCollected" name="star_fill" style="font-size:20px;cursor: pointer;" @click="handleCancelCollectReport"></svg-icon>
|
|
|
+ <svg-icon v-if="info?.IsCollected||chapterInfo?.IsCollected" name="star_fill" style="font-size:20px;cursor: pointer;" @click="handleCancelCollectReport"></svg-icon>
|
|
|
<svg-icon v-else name="star" style="font-size:20px;cursor: pointer;" @click="showCollectReport=true"></svg-icon>
|
|
|
</div>
|
|
|
- {{info.IsCollected ? '已收藏' : '收藏研报'}}
|
|
|
+ {{(info.IsCollected||chapterInfo.IsCollected) ? '已收藏' : '收藏研报'}}
|
|
|
</div>
|
|
|
</div>
|
|
|
</div>
|
|
@@ -194,12 +198,12 @@ onUnmounted(() => {
|
|
|
|
|
|
<!-- 章节详情内容区 -->
|
|
|
<div class="report-wrapper "
|
|
|
- :style="info.HasChapter?'chapter-detail':''"
|
|
|
+ :class="info.HasChapter?'chapter-detail':''"
|
|
|
v-if="info.HasChapter||route.query.chapterId"
|
|
|
>
|
|
|
<!-- 无版头板尾显示标题 -->
|
|
|
|
|
|
- <div class="title">{{formatChapterTitle(chapterInfo)}}</div>
|
|
|
+ <div class="title" v-if="chapterInfo?.Title">{{formatChapterTitle(chapterInfo)}}</div>
|
|
|
<div class="time flex">
|
|
|
<span>{{chapterInfo.Author}}</span>
|
|
|
<span>{{moment(chapterInfo.PublishTime).format('YYYY.MM.DD HH:mm')}}</span>
|
|
@@ -235,7 +239,7 @@ onUnmounted(() => {
|
|
|
<div class="report-wrapper" v-else>
|
|
|
<!-- 无版头板尾显示标题 -->
|
|
|
<template v-if="(!info.HeadImg) && (!info.EndImg)">
|
|
|
- <div class="title">{{formatTitle(info)}}</div>
|
|
|
+ <div class="title" v-if="info?.Title">{{formatTitle(info)}}</div>
|
|
|
<div class="time flex">
|
|
|
<span>{{info.Author}}</span>
|
|
|
<span>{{moment(info.PublishTime).format('YYYY.MM.DD HH:mm')}}</span>
|
|
@@ -317,7 +321,7 @@ onUnmounted(() => {
|
|
|
reportId: Number(route.query.id),
|
|
|
chapterId: Number(route.query.chapterId)
|
|
|
}"
|
|
|
- @success="info.IsCollected=true"
|
|
|
+ @success="route.query.chapterId?(info.IsCollected=true):(chapterInfo.IsCollected=true)"
|
|
|
/>
|
|
|
|
|
|
<t-back-top
|
|
@@ -372,6 +376,7 @@ onUnmounted(() => {
|
|
|
max-width: 970px;
|
|
|
margin: 0 auto;
|
|
|
padding-bottom: 20px;
|
|
|
+ overflow: hidden;
|
|
|
&.chapter-detail {
|
|
|
padding-left: 230px;
|
|
|
max-width: none;
|