reportDetail.vue 17 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436
  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.report_chapter_type_thumb" 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. <!-- 无权限 -->
  33. <view class="no-auth-box" v-if="!info.auth_ok">
  34. <image class="img" :src="globalImgUrls.activityNoAuth" mode="widthFix"></image>
  35. <view class="apply-box" v-if="info.permission_check.type=='apply'">
  36. <view>您暂无权限查看报告,若想查看请申请开通</view>
  37. <view class="btn" @click="handleGoApply">立即申请</view>
  38. </view>
  39. <view class="apply-box" v-else>
  40. <view>您暂无权限查看报告 </view>
  41. <view>若想查看请联系对口销售:{{info.permission_check.name}}</view>
  42. <view class="btn" @click="handleContact">立即联系</view>
  43. </view>
  44. </view>
  45. </view>
  46. <!-- 报告详情 -->
  47. <view class="main-box" v-else>
  48. <view class="title">【第{{info.report_info.stage}}期|{{info.report_info.classify_name_second}}】{{info.report_info.title}}</view>
  49. <view class="flex time">
  50. <text>{{info.report_info.author}}</text>
  51. <text>{{formatTime(info.report_info.publish_time)}}</text>
  52. </view>
  53. <view class="flex audio-wrap">
  54. <image style="opacity:0.3" src="./static/audio-pause.png" mode="aspectFill" v-if="!info.auth_ok"/>
  55. <image src="./static/audio-pause.png" mode="aspectFill" v-else/>
  56. <view>
  57. <view>{{info.report_info.video_name}}</view>
  58. <view style="color:#999999">{{info.report_info.video_play_seconds|formatVoiceTime}}</view>
  59. </view>
  60. </view>
  61. <view class="tips">
  62. <text>注:请务必阅读</text>
  63. <text style="color:#E3B377;margin-left:20rpx" @click="showDisclaimers=true">免责声明</text>
  64. </view>
  65. <view class="rich-content">
  66. <mp-html :content="info.report_info.content" v-if="info.auth_ok" />
  67. <mp-html :content="info.report_info.content_sub" v-else />
  68. </view>
  69. <!-- 无权限 -->
  70. <view class="no-auth-wrap" v-if="!info.auth_ok">
  71. <view class="apply-box" v-if="info.permission_check.type=='apply'">
  72. <view>您暂无权限查看报告,若想查看请申请开通</view>
  73. <view class="btn" @click="handleGoApply">立即申请</view>
  74. </view>
  75. <view class="apply-box" v-else>
  76. <view>您暂无权限查看报告 </view>
  77. <view>若想查看请联系对口销售:{{info.permission_check.name}}</view>
  78. <view class="btn" @click="handleContact">立即联系</view>
  79. </view>
  80. </view>
  81. <!-- 返回顶部 -->
  82. <image v-if="" @click="handleBackTop" class="back-top-img" src="./static/back-top.png" mode="aspectFill"/>
  83. </view>
  84. <!-- 免责声明 -->
  85. <van-popup :show="showDisclaimers" @close="showDisclaimers=false" round closeable>
  86. <view class="disclaimers-box">
  87. <view style="text-align:center;font-size:16px;font-weight:bold;margin-bottom:20rpx">免责声明</view>
  88. <view style="margin-bottom:10rpx">1、本报告仅供弘则弥道(上海)投资咨询有限公司正式签约的机构客户使用,不会仅因接收人/接受机构收到本报告而将其视为客户。</view>
  89. <view style="margin-bottom:10rpx">2、本报告根据国际和行业通行的准则,以合法渠道获得这些信息,尽可能保证可靠、准确和完整,但并不保证报告所述信息的准确性和完整性,也不保证本报告所包含的信息或建议在本报告发出后不会发生任何变更。本报告中所提供的信息仅供参考。</view>
  90. <view style="margin-bottom:10rpx">3、报告中的内容不对投资者做出的最终操作建议做任何的担保,也没有任何形式的分享投资收益或者分担投资损失的书面或口头承诺。不作为客户在投资、法律、会计或税务等方面的最终操作建议,也不作为道义的、责任的和法律的依据或者凭证,无论是否已经明示或者暗示。</view>
  91. <view style="margin-bottom:10rpx">4、在任何情况下,本公司不对客户/接受人/接受机构因使用报告中内容所引致的一切损失负责任,客户/接受人/接受机构需自行承担全部风险。</view>
  92. </view>
  93. </van-popup>
  94. <!-- 申请提示弹窗 -->
  95. <van-popup :show="pupData.show" @close="pupData.show=false" :close-on-click-overlay="false">
  96. <view class="global-pup">
  97. <view class="content">
  98. <rich-text :nodes="pupData.content"></rich-text>
  99. </view>
  100. <view class="flex bot">
  101. <view @click="pupData.show=false">知道了</view>
  102. </view>
  103. </view>
  104. </van-popup>
  105. </view>
  106. </template>
  107. <script>
  108. const moment=require('@/utils/moment-with-locales.min')
  109. moment.locale('zh-cn');
  110. import {apiReportDetail} from '@/api/report'
  111. import {apiApplyPermission} from '@/api/user'
  112. export default {
  113. data () {
  114. return {
  115. showDisclaimers:false,//显示免责声明
  116. reportId:0,
  117. info:null,
  118. chapterList:[],
  119. pupData:{
  120. show:false,
  121. content:'',//弹窗html字符串
  122. }
  123. }
  124. },
  125. onLoad(options) {
  126. this.reportId=options.reportId
  127. this.getDetail()
  128. },
  129. onPullDownRefresh() {
  130. this.getDetail()
  131. setTimeout(() => {
  132. uni.stopPullDownRefresh()
  133. }, 1500);
  134. },
  135. methods: {
  136. //获取报告详情
  137. async getDetail(){
  138. const res=await apiReportDetail({report_id:Number(this.reportId)})
  139. if(res.code===200){
  140. this.info=res.data
  141. this.chapterList=res.data.report_chapter_list
  142. uni.setNavigationBarTitle({ title: res.data.report_info.classify_name_first })
  143. if(!res.data.auth_ok){
  144. // 获取详情如果为联系销售根据判断条件是否主动申请一次
  145. if(this.info.permission_check.type=='contact'&&!this.info.permission_check.customer_info.has_apply){
  146. if(this.info.permission_check.customer_info.status=='冻结'||(this.info.permission_check.customer_info.status=='试用'&&this.info.permission_check.customer_info.is_suspend==1)){
  147. apiApplyPermission({
  148. company_name:this.info.permission_check.customer_info.company_name,
  149. real_name:this.info.permission_check.customer_info.name,
  150. source:4,
  151. from_page:'报告详情'
  152. }).then(res=>{
  153. if(res.code===200){
  154. console.log('主动申请成功');
  155. }
  156. })
  157. }
  158. }
  159. }
  160. }
  161. },
  162. //返回顶部
  163. handleBackTop(){
  164. uni.pageScrollTo({ scrollTop: 0 })
  165. },
  166. //跳转章节详情
  167. goChapterDetail(item){
  168. uni.navigateTo({ url: '/pages-report/chapterDetail?chapterId='+item.report_chapter_id })
  169. },
  170. // 格式化时间
  171. formatTime(time){
  172. return moment(time).format('YYYY-MM-DD HH:mm:ss')
  173. },
  174. // 格式化章节列表时间
  175. formatChapterTime(time,type){
  176. if(type==='day'){
  177. return moment(time).format('DD')
  178. }
  179. if(type==='week'){
  180. return moment(time).format('dddd')
  181. }
  182. if(type==='year-month'){
  183. return moment(time).format('YYYY-MM')
  184. }
  185. if(type==='year-month-day'){
  186. return moment(time).format('YYYY-MM-DD')
  187. }
  188. },
  189. // 联系销售
  190. handleContact(){
  191. uni.makePhoneCall({
  192. phoneNumber: this.info.permission_check.mobile
  193. });
  194. },
  195. //点击申请
  196. async handleGoApply(){
  197. if(this.info.permission_check.type=='apply'){
  198. if(this.info.permission_check.customer_info.has_apply){// 已经申请过
  199. this.pupData.show=true
  200. this.pupData.content=`<p>您已提交过申请,请耐心等待</p>`
  201. }else{
  202. if(!this.info.permission_check.customer_info.status||this.info.permission_check.customer_info.status!='流失'){
  203. uni.redirectTo({
  204. url:"/pages-applyPermission/applyPermission?source=4&from_page=报告详情"
  205. })
  206. }else{//主动调一次申请权限接口
  207. const res=await apiApplyPermission({
  208. company_name:this.info.permission_check.customer_info.company_name,
  209. real_name:this.info.permission_check.customer_info.name,
  210. source:4,
  211. from_page:'报告详情'
  212. })
  213. if(res.code===200){
  214. this.pupData.show=true
  215. this.pupData.content=`<p>申请已提交</p><p>请等待销售人员与您联系</p>`
  216. }
  217. }
  218. }
  219. }
  220. },
  221. }
  222. }
  223. </script>
  224. <style lang="scss" scoped>
  225. .report-detail-page{
  226. .main-box{
  227. padding: 34rpx;
  228. }
  229. .title{
  230. font-size: 36rpx;
  231. font-weight: bold;
  232. margin-bottom: 30rpx;
  233. }
  234. .time{
  235. justify-content: space-between;
  236. font-size: 28rpx;
  237. }
  238. .audio-wrap{
  239. height: 160rpx;
  240. background: #FAF7EE;
  241. border-radius: 16rpx;
  242. margin-top: 20rpx;
  243. padding: 10rpx 31rpx;
  244. margin-bottom: 31rpx;
  245. align-items: center;
  246. image{
  247. width: 110rpx;
  248. height: 110rpx;
  249. display: block;
  250. margin-right: 16rpx;
  251. }
  252. }
  253. .tips{
  254. font-size: 34rpx;
  255. margin-bottom: 51rpx;
  256. &::before{
  257. content: '';
  258. width: 10rpx;
  259. height: 50rpx;
  260. display: inline-block;
  261. background-color: #E3B377;
  262. margin-right: 20rpx;
  263. position: relative;
  264. top: 10rpx;
  265. }
  266. }
  267. .disclaimers-box{
  268. width: 94vw;
  269. padding: 32rpx;
  270. }
  271. .rich-content{
  272. line-height: 1.7;
  273. font-size: 32rpx;
  274. }
  275. .no-auth-wrap{
  276. min-height: 200rpx;
  277. background: linear-gradient(360deg, #FFFFFF 60%, rgba(255, 255, 255, 0) 88%);
  278. position: relative;
  279. top: -150rpx;
  280. text-align: center;
  281. font-size: 32rpx;
  282. color: #E3B377;
  283. .apply-box{
  284. padding-top: 250rpx;
  285. }
  286. .btn{
  287. width: 100%;
  288. margin-left: auto;
  289. margin-right: auto;
  290. line-height: 80rpx;
  291. background-color: #E6B77D;
  292. border-radius: 4rpx;
  293. color: #fff;
  294. margin-top: 100rpx;
  295. }
  296. }
  297. .back-top-img{
  298. position: fixed;
  299. z-index: 99;
  300. width: 76rpx;
  301. height: 76rpx;
  302. right: 34rpx;
  303. bottom: 100rpx;
  304. }
  305. .chapter-list-wrap{
  306. .top-box{
  307. height: 418rpx;
  308. background-color: rgba($color: #000000, $alpha: 0.7);
  309. background-size: cover;
  310. color: #fff;
  311. position: relative;
  312. .title{
  313. text-align: center;
  314. font-size: 34rpx;
  315. font-weight: 600;
  316. padding-top: 78rpx;
  317. }
  318. .sub-title{
  319. font-size: 32rpx;
  320. text-align: center;
  321. width: 70%;
  322. margin-left: auto;
  323. margin-right: auto;
  324. }
  325. .top-bot{
  326. position: absolute;
  327. bottom: 70rpx;
  328. left: 34rpx;
  329. right: 34rpx;
  330. justify-content: space-between;
  331. align-items: flex-end;
  332. .time-box{
  333. align-items: center;
  334. font-size: 24rpx;
  335. .day{
  336. font-size: 32rpx;
  337. border-right: 1px solid #fff;
  338. padding-right: 15rpx;
  339. margin-right: 15rpx;
  340. }
  341. }
  342. }
  343. }
  344. .list-box{
  345. margin-top: -50rpx;
  346. border-top-left-radius: 40rpx;
  347. border-top-right-radius: 40rpx;
  348. min-height: 100rpx;
  349. background-color: #fff;
  350. position: relative;
  351. z-index: 2;
  352. .item{
  353. padding: 50rpx 34rpx;
  354. border-bottom: 1px solid #E5E5E5;
  355. .img{
  356. width: 112rpx;
  357. height: 112rpx;
  358. // background-color: #f5f5f5;
  359. flex-shrink: 0;
  360. margin-right: 20rpx;
  361. }
  362. .con{
  363. flex: 1;
  364. .title{
  365. font-size: 32rpx;
  366. color: #57768D;
  367. font-weight: bold;
  368. margin-bottom: 10rpx;
  369. .tag{
  370. font-size: 20rpx;
  371. color: #fff;
  372. font-weight: normal;
  373. display: inline-block;
  374. background-color: #1E88E5;
  375. line-height: 37rpx;
  376. padding: 0 6rpx;
  377. border-radius: 4rpx;
  378. margin-left: 10rpx;
  379. }
  380. }
  381. .sub-title{
  382. color: #999;
  383. }
  384. .update-time{
  385. float: right;
  386. color: #D4D4D4;
  387. font-size: 20rpx;
  388. }
  389. }
  390. }
  391. }
  392. .no-auth-box{
  393. text-align: center;
  394. font-size: 32rpx;
  395. color: #E3B377;
  396. img{
  397. width: 100%;
  398. margin-bottom: 50rpx;
  399. }
  400. .btn{
  401. width: 90%;
  402. margin-left: auto;
  403. margin-right: auto;
  404. line-height: 80rpx;
  405. background-color: #E6B77D;
  406. border-radius: 4rpx;
  407. color: #fff;
  408. margin-top: 100rpx;
  409. }
  410. }
  411. }
  412. }
  413. </style>