reportDetail.vue 11 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287
  1. <template>
  2. <view class="report-detail-page" v-if="info">
  3. <!-- 晨报、周报章节 -->
  4. <view class="chapter-list-wrap" v-if="['晨报','周报'].includes(info.report_info.classify_name_first)">
  5. <view class="top-box" :style="'background-image:url(' + info.report_info.banner_url + ')'">
  6. <view class="title">{{info.report_info.classify_name_first}}</view>
  7. <view class="sub-title">{{info.report_info.title}}</view>
  8. <view class="flex top-bot">
  9. <view class="flex time-box">
  10. <view class="day">{{formatChapterTime(info.report_info.publish_time,'day')}}</view>
  11. <view>
  12. <view>{{formatChapterTime(info.report_info.publish_time,'week')}}</view>
  13. <view>{{formatChapterTime(info.report_info.publish_time,'year-month')}}</view>
  14. </view>
  15. </view>
  16. <view class="num">第{{info.report_info.stage}}期</view>
  17. </view>
  18. </view>
  19. <view class="list-box">
  20. <view class="flex item" v-for="item in chapterList" :key="item.report_chapter_id" @click="goChapterDetail(item)">
  21. <image class="img" :src="item.banner_url" mode="aspectFill" />
  22. <view class="con">
  23. <view class="title">
  24. {{item.report_chapter_type_name}}
  25. <text class="tag" v-for="tag in item.trend.split(',')" :key="tag">{{tag}}</text>
  26. </view>
  27. <view class="van-multi-ellipsis--l2 sub-title">{{item.title}}</view>
  28. <view class="update-time">更新至:{{formatChapterTime(item.publish_time,'year-month-day')}}</view>
  29. </view>
  30. </view>
  31. </view>
  32. </view>
  33. <!-- 报告详情 -->
  34. <view class="main-box" v-else>
  35. <view class="title">【第{{info.report_info.stage}}期|{{info.report_info.classify_name_second}}】{{info.report_info.title}}</view>
  36. <view class="flex time">
  37. <text>{{info.report_info.author}}</text>
  38. <text>{{formatTime(info.report_info.publish_time)}}</text>
  39. </view>
  40. <view class="flex audio-wrap">
  41. <image src="" mode="aspectFill"/>
  42. <view>
  43. <view>{{info.report_info.video_name}}</view>
  44. <view style="color:#999999">{{info.report_info.video_play_seconds|formatVoiceTime}}</view>
  45. </view>
  46. </view>
  47. <view class="tips">
  48. <text>注:请务必阅读</text>
  49. <text style="color:#E3B377;margin-left:20rpx" @click="showDisclaimers=true">免责声明</text>
  50. </view>
  51. <view class="rich-content">
  52. <mp-html :content="info.report_info.content"/>
  53. </view>
  54. <!-- 返回顶部 -->
  55. <image v-if="" @click="handleBackTop" class="back-top-img" src="./static/back-top.png" mode="aspectFill"/>
  56. </view>
  57. <!-- 免责声明 -->
  58. <van-popup :show="showDisclaimers" @close="showDisclaimers=false" round closeable>
  59. <view class="disclaimers-box">
  60. <view style="text-align:center;font-size:16px;font-weight:bold;margin-bottom:20rpx">免责声明</view>
  61. <view style="margin-bottom:10rpx">1、本报告仅供弘则弥道(上海)投资咨询有限公司正式签约的机构客户使用,不会仅因接收人/接受机构收到本报告而将其视为客户。</view>
  62. <view style="margin-bottom:10rpx">2、本报告根据国际和行业通行的准则,以合法渠道获得这些信息,尽可能保证可靠、准确和完整,但并不保证报告所述信息的准确性和完整性,也不保证本报告所包含的信息或建议在本报告发出后不会发生任何变更。本报告中所提供的信息仅供参考。</view>
  63. <view style="margin-bottom:10rpx">3、报告中的内容不对投资者做出的最终操作建议做任何的担保,也没有任何形式的分享投资收益或者分担投资损失的书面或口头承诺。不作为客户在投资、法律、会计或税务等方面的最终操作建议,也不作为道义的、责任的和法律的依据或者凭证,无论是否已经明示或者暗示。</view>
  64. <view style="margin-bottom:10rpx">4、在任何情况下,本公司不对客户/接受人/接受机构因使用报告中内容所引致的一切损失负责任,客户/接受人/接受机构需自行承担全部风险。</view>
  65. </view>
  66. </van-popup>
  67. </view>
  68. </template>
  69. <script>
  70. const moment=require('@/utils/moment-with-locales.min')
  71. moment.locale('zh-cn');
  72. import {apiReportDetail} from '@/api/report'
  73. export default {
  74. data () {
  75. return {
  76. showDisclaimers:false,//显示免责声明
  77. html:'<h1>Hello World!</h1>',
  78. reportId:0,
  79. info:null,
  80. chapterList:[]
  81. }
  82. },
  83. onLoad(options) {
  84. this.reportId=options.reportId
  85. this.getDetail()
  86. },
  87. methods: {
  88. async getDetail(){
  89. const res=await apiReportDetail({report_id:Number(this.reportId)})
  90. if(res.code===200){
  91. this.info=res.data
  92. this.chapterList=res.data.report_chapter_list
  93. uni.setNavigationBarTitle({ title: res.data.report_info.classify_name_first })
  94. }
  95. },
  96. handleBackTop(){
  97. uni.pageScrollTo({ scrollTop: 0 })
  98. },
  99. goChapterDetail(item){
  100. uni.navigateTo({ url: '/pages-report/chapterDetail?chapterId='+item.report_chapter_id })
  101. },
  102. formatTime(time){
  103. return moment(time).format('YYYY-MM-DD HH:mm:ss')
  104. },
  105. formatChapterTime(time,type){
  106. if(type==='day'){
  107. return moment(time).format('DD')
  108. }
  109. if(type==='week'){
  110. return moment(time).format('dddd')
  111. }
  112. if(type==='year-month'){
  113. return moment(time).format('YYYY-MM')
  114. }
  115. if(type==='year-month-day'){
  116. return moment(time).format('YYYY-MM-DD')
  117. }
  118. }
  119. }
  120. }
  121. </script>
  122. <style lang="scss" scoped>
  123. .report-detail-page{
  124. .main-box{
  125. padding: 34rpx;
  126. }
  127. .title{
  128. font-size: 36rpx;
  129. font-weight: bold;
  130. margin-bottom: 30rpx;
  131. }
  132. .time{
  133. justify-content: space-between;
  134. font-size: 28rpx;
  135. }
  136. .audio-wrap{
  137. height: 160rpx;
  138. background: #FAF7EE;
  139. border-radius: 16rpx;
  140. margin-top: 20rpx;
  141. padding: 10rpx 31rpx;
  142. margin-bottom: 31rpx;
  143. align-items: center;
  144. image{
  145. width: 110rpx;
  146. height: 110rpx;
  147. display: block;
  148. background-color: rgb(233, 230, 230);
  149. margin-right: 16rpx;
  150. }
  151. }
  152. .tips{
  153. font-size: 34rpx;
  154. margin-bottom: 51rpx;
  155. &::before{
  156. content: '';
  157. width: 10rpx;
  158. height: 50rpx;
  159. display: inline-block;
  160. background-color: #E3B377;
  161. margin-right: 20rpx;
  162. position: relative;
  163. top: 10rpx;
  164. }
  165. }
  166. .disclaimers-box{
  167. width: 94vw;
  168. padding: 32rpx;
  169. }
  170. .rich-content{
  171. line-height: 1.7;
  172. font-size: 32rpx;
  173. }
  174. .back-top-img{
  175. position: fixed;
  176. z-index: 99;
  177. width: 76rpx;
  178. height: 76rpx;
  179. right: 34rpx;
  180. bottom: 100rpx;
  181. }
  182. .chapter-list-wrap{
  183. .top-box{
  184. height: 418rpx;
  185. background-color: rgba($color: #000000, $alpha: 0.7);
  186. background-size: cover;
  187. color: #fff;
  188. position: relative;
  189. .title{
  190. text-align: center;
  191. font-size: 34rpx;
  192. font-weight: 600;
  193. padding-top: 78rpx;
  194. }
  195. .sub-title{
  196. font-size: 32rpx;
  197. text-align: center;
  198. width: 70%;
  199. margin-left: auto;
  200. margin-right: auto;
  201. }
  202. .top-bot{
  203. position: absolute;
  204. bottom: 70rpx;
  205. left: 34rpx;
  206. right: 34rpx;
  207. justify-content: space-between;
  208. align-items: flex-end;
  209. .time-box{
  210. align-items: center;
  211. font-size: 24rpx;
  212. .day{
  213. font-size: 32rpx;
  214. border-right: 1px solid #fff;
  215. padding-right: 15rpx;
  216. margin-right: 15rpx;
  217. }
  218. }
  219. }
  220. }
  221. .list-box{
  222. margin-top: -50rpx;
  223. border-top-left-radius: 40rpx;
  224. border-top-right-radius: 40rpx;
  225. min-height: 200rpx;
  226. background-color: #fff;
  227. position: relative;
  228. z-index: 2;
  229. .item{
  230. padding: 50rpx 34rpx;
  231. border-bottom: 1px solid #E5E5E5;
  232. .img{
  233. width: 112rpx;
  234. height: 112rpx;
  235. // background-color: #f5f5f5;
  236. flex-shrink: 0;
  237. margin-right: 20rpx;
  238. }
  239. .con{
  240. flex: 1;
  241. .title{
  242. font-size: 32rpx;
  243. color: #57768D;
  244. font-weight: bold;
  245. margin-bottom: 10rpx;
  246. .tag{
  247. font-size: 20rpx;
  248. color: #fff;
  249. font-weight: normal;
  250. display: inline-block;
  251. background-color: #1E88E5;
  252. line-height: 37rpx;
  253. padding: 0 6rpx;
  254. border-radius: 4rpx;
  255. margin-left: 10rpx;
  256. }
  257. }
  258. .sub-title{
  259. color: #999;
  260. }
  261. .update-time{
  262. float: right;
  263. color: #D4D4D4;
  264. font-size: 20rpx;
  265. }
  266. }
  267. }
  268. }
  269. }
  270. }
  271. </style>