report.vue 13 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410
  1. <template>
  2. <view class="container-report-page">
  3. <view class="content-list">
  4. <block v-if="reportPageData.ListHzResource.length">
  5. <view class="resource">
  6. <image src="https://hzchart.oss-cn-shanghai.aliyuncs.com/cygx/czbk/zybico.jpg"></image>
  7. <text>弘则资源包</text>
  8. </view>
  9. <text style="height: 1rpx; background: #ececec"></text>
  10. <view class="list-ui" v-for="item in reportPageData.ListHzResource" :key="item.IndustrialManagementId" @click="themeDetails(item)">
  11. <view class="item-title">
  12. <text>
  13. {{ item.IndustryName }}
  14. </text>
  15. <view class="publish">
  16. {{ item.PublishDate }}更新
  17. <u-icon name="arrow-right" color="#BDBDBD" size="34"></u-icon>
  18. </view>
  19. </view>
  20. <view class="read-more" v-if="item.IndustrialSubjectList">
  21. <!-- <text class="text-box text_oneLine" v-for="val in item.IndustrialSubjectList" :key="val.IndustrialSubjectId">
  22. {{ val.SubjectName }}
  23. </text> -->
  24. <view class="industry-video-item" @click.stop="handelVideoPlay(item)"
  25. :style="{'background-image':'url('+item.IndustryVideo.BackgroundImg+ ')'}" v-if="item.IndustryVideo">
  26. 5min
  27. <br />
  28. 逻辑解析
  29. <view class="industry-video-icon">
  30. <image src="https://hzstatic.hzinsights.com/cygx/video-right-top-icon.svg"></image>
  31. </view>
  32. </view>
  33. <view v-if="item.IndustryVideo" style="display: flex;flex-wrap: wrap;width: 420rpx;">
  34. <view v-for="val in item.IndustrialSubjectList.slice(0,4)" :key="val.IndustrialSubjectId" class="text-box text_oneLine">
  35. {{ val.SubjectName }}
  36. </view>
  37. </view>
  38. <block v-if="item.IndustryVideo && item.IndustrialSubjectList.length>4">
  39. <view v-for="val in item.IndustrialSubjectList.slice(4)" :key="val.IndustrialSubjectId" class="text-box text_oneLine">
  40. {{ val.SubjectName }}
  41. </view>
  42. </block>
  43. <block v-if="!item.IndustryVideo">
  44. <view v-for="val in item.IndustrialSubjectList" :key="val.IndustrialSubjectId" class="text-box text_oneLine">
  45. {{ val.SubjectName }}
  46. </view>
  47. </block>
  48. </view>
  49. </view>
  50. </block>
  51. <block v-if="reportPageData.ListYxResource.length">
  52. <view class="resource">
  53. <image src="https://hzchart.oss-cn-shanghai.aliyuncs.com/cygx/czbk/zybico.jpg"></image>
  54. <text>买方研选主题</text>
  55. </view>
  56. <text style="height: 1rpx; background: #ececec"></text>
  57. <view class="list-ui" v-for="item in reportPageData.ListYxResource" :key="item.IndustrialManagementId" @click="themeDetails(item)">
  58. <view class="item-title">
  59. <text>
  60. {{ item.IndustryName }}
  61. </text>
  62. <view class="publish">
  63. {{ item.PublishDate }}更新
  64. <u-icon name="arrow-right" color="#BDBDBD" size="34"></u-icon>
  65. </view>
  66. </view>
  67. <view class="read-more" v-if="item.IndustrialSubjectList">
  68. <!-- <text class="text-box text_oneLine" v-for="val in item.IndustrialSubjectList" :key="val.IndustrialSubjectId">
  69. {{ val.SubjectName }}
  70. </text> -->
  71. <view class="industry-video-item" @click.stop="handelVideoPlay(item)"
  72. :style="{'background-image':'url('+item.IndustryVideo.BackgroundImg+ ')'}" v-if="item.IndustryVideo">
  73. 5min
  74. <br />
  75. 逻辑解析
  76. <view class="industry-video-icon">
  77. <image src="https://hzstatic.hzinsights.com/cygx/video-right-top-icon.svg"></image>
  78. </view>
  79. </view>
  80. <view v-if="item.IndustryVideo" style="display: flex;flex-wrap: wrap;width: 420rpx;">
  81. <view v-for="val in item.IndustrialSubjectList.slice(0,4)" :key="val.IndustrialSubjectId" class="text-box text_oneLine">
  82. {{ val.SubjectName }}
  83. </view>
  84. </view>
  85. <block v-if="item.IndustryVideo && item.IndustrialSubjectList.length>4">
  86. <view v-for="val in item.IndustrialSubjectList.slice(4)" :key="val.IndustrialSubjectId" class="text-box text_oneLine">
  87. {{ val.SubjectName }}
  88. </view>
  89. </block>
  90. <block v-if="!item.IndustryVideo">
  91. <view v-for="val in item.IndustrialSubjectList" :key="val.IndustrialSubjectId" class="text-box text_oneLine">
  92. {{ val.SubjectName }}
  93. </view>
  94. </block>
  95. </view>
  96. </view>
  97. </block>
  98. </view>
  99. <view class="content-report">
  100. <block v-if="reportPageData.ListYxReport.length">
  101. <view class="resource">
  102. <image src="https://hzchart.oss-cn-shanghai.aliyuncs.com/cygx/czbk/report_Yx.png"></image>
  103. <text>买方研选报告</text>
  104. </view>
  105. <text style="height: 1rpx; background: #ececec"></text>
  106. <view class="content-item" v-for="item in reportPageData.ListYxReport" :key="item.ArticleId">
  107. <view class="item-user">
  108. <image src="https://hzchart.oss-cn-shanghai.aliyuncs.com/cygx/czbk/user_report.png"></image>
  109. <text> {{ item.NickName }}</text>
  110. </view>
  111. <view class="item-title">
  112. <text style="display: inline" @click="goDetailReport(item)">
  113. {{ item.Title }}
  114. </text>
  115. <text class="item-industry" v-if="item.IndustryName" @click="themeDetails(item)">&nbsp;&nbsp;&nbsp;#{{ item.IndustryName }}</text>
  116. </view>
  117. <view class="item-more">
  118. <text>{{ item.PublishDate }}</text>
  119. <view class="pv-ollect">
  120. <view>
  121. <image class="pv" src="https://hzchart.oss-cn-shanghai.aliyuncs.com/cygx/czbk/examine_icon.png"></image>
  122. {{ item.Pv }}
  123. </view>
  124. <view @click="collectClick(item)">
  125. <image v-if="item.IsCollect" src="https://hzchart.oss-cn-shanghai.aliyuncs.com/cygx/czbk/collect_act.png"></image>
  126. <image v-else src="https://hzchart.oss-cn-shanghai.aliyuncs.com/cygx/czbk/collect_ico.png"></image>
  127. {{ item.CollectNum }}人收藏
  128. </view>
  129. </view>
  130. </view>
  131. </view>
  132. </block>
  133. <block v-if="reportPageData.ListHzReport.length">
  134. <view class="resource">
  135. <image src="https://hzchart.oss-cn-shanghai.aliyuncs.com/cygx/czbk/report_Hz.png"></image>
  136. <text>弘则报告</text>
  137. </view>
  138. <text style="height: 1rpx; background: #ececec"></text>
  139. <view class="content-item" v-for="item in reportPageData.ListHzReport" :key="item.ArticleId">
  140. <view class="item-title">
  141. <text style="display: inline" @click="goDetailReport(item)">
  142. {{ item.Title }}
  143. </text>
  144. <text class="item-industry" @click="themeDetails(item)" v-if="item.IndustryName">&nbsp;&nbsp;&nbsp;#{{ item.IndustryName }}</text>
  145. </view>
  146. <view class="item-more">
  147. <text>{{ item.PublishDate }}</text>
  148. </view>
  149. </view>
  150. </block>
  151. </view>
  152. <u-modal
  153. v-model="goFollowShow"
  154. :content-style="{ fontSize: '32rpx' }"
  155. @confirm="goFollowShowBtn"
  156. :show-cancel-button="isCancelBtn"
  157. :confirm-text="confirmText"
  158. @cancel="isCancelBtn = false"
  159. :show-title="false"
  160. :cancel-style="{ borderRight: '1rpx solid #EBEBEB' }"
  161. :confirm-style="{ fontWeight: '700' }"
  162. >
  163. <view class="slot-content">
  164. <rich-text :nodes="accounts"></rich-text>
  165. </view>
  166. </u-modal>
  167. <!-- 视频模块 -->
  168. <videoModule :showVideoPop="showVideoPop" :videoPopList="videoPopList" class="industry-video-module"/>
  169. </view>
  170. </template>
  171. <script>
  172. import {Report } from "@/config/api"
  173. import videoModule from "@/components/videoModule/index";
  174. export default {
  175. components: {videoModule},
  176. props: {
  177. reportPageData: {
  178. type: Object,
  179. },
  180. },
  181. data() {
  182. return {
  183. goFollowShow: false,
  184. confirmText: "知道了",
  185. isCancelBtn: false,
  186. accounts: "",
  187. showVideoPop:false, //视频弹窗显示控制
  188. videoPopList:{},// 视频信息
  189. };
  190. },
  191. watch: {},
  192. methods: {
  193. //去往文章详情页面
  194. goDetailReport(item) {
  195. this.$store.dispatch("checkHandle", "/pageMy/reportDetail/reportDetail?id=" + item.ArticleId);
  196. },
  197. /* 进入详情 校验是否有该品种权限 */
  198. goDetail(item) {
  199. uni.navigateTo({
  200. url: "/reportPages/IndustryReport/IndustryReport?id=" + item.IndustrialManagementId,
  201. });
  202. },
  203. //去往主题详情
  204. themeDetails(item) {
  205. if (item.Source === 1) {
  206. //非严选
  207. this.$store.dispatch("checkHandle", "/reportPages/IndustryReport/IndustryReport?id=" + item.IndustrialManagementId);
  208. } else {
  209. //严选
  210. this.$store.dispatch("checkHandle", "/reportPages/researchTheme/researchTheme?id=" + item.IndustrialManagementId);
  211. }
  212. },
  213. //收藏
  214. async collectClick(item) {
  215. const res = await Report.collectRpt({ ArticleId: item.ArticleId });
  216. if (res.Ret === 200) {
  217. item.IsCollect = !item.IsCollect;
  218. item.IsCollect
  219. ? (item.CollectNum += 1) &&
  220. uni.showToast({
  221. title: "收藏成功",
  222. icon: "none",
  223. duration: 2000,
  224. })
  225. : (item.CollectNum -= 1);
  226. !item.IsCollect &&
  227. uni.showToast({
  228. title: "已取消收藏",
  229. icon: "none",
  230. duration: 2000,
  231. });
  232. }
  233. },
  234. //点击了去关注
  235. goFollowShowBtn() {
  236. if (this.confirmText == "去关注") {
  237. uni.navigateTo({
  238. url: "/activityPages/accountsOfficial/accountsOfficial",
  239. });
  240. }
  241. this.goFollowShow = false;
  242. },
  243. // 视频播放事件
  244. handelVideoPlay(item){
  245. let params={
  246. Id:item.IndustryVideo.Id,
  247. ResourceUrl:item.IndustryVideo.ResourceUrl,
  248. BackgroundImg:item.IndustryVideo.BackgroundImg,
  249. Title:`5min【${item.IndustryName}】逻辑解析`
  250. }
  251. if (this.$store.state.videoPlay.playVideoId != item.Id) {
  252. this.$store.commit("videoPlay/palyTimeUpdate", 0);
  253. this.$store.commit("videoPlay/playVideo", item.Id);
  254. }
  255. console.log(params);
  256. this.globalBgAudioManager.stop();
  257. this.videoPopList = params;
  258. this.showVideoPop = true;
  259. }
  260. },
  261. };
  262. </script>
  263. <style scoped lang="scss">
  264. .container-report-page {
  265. background-color: #f5f6fa;
  266. .content-list {
  267. .list-ui {
  268. background-color: #fff;
  269. margin-top: 2rpx;
  270. }
  271. .item-title {
  272. display: flex;
  273. align-items: center;
  274. justify-content: space-between;
  275. height: 100rpx;
  276. border-bottom: 1px solid #f6f6f6;
  277. padding: 0 30rpx;
  278. background-color: #fff;
  279. .publish {
  280. display: flex;
  281. align-items: center;
  282. color: #999999;
  283. font-style: 26rpx;
  284. }
  285. }
  286. .read-more {
  287. margin-top: 20rpx;
  288. display: flex;
  289. flex-wrap: wrap;
  290. margin-left: 80rpx;
  291. .industry-video-item{
  292. height: 126rpx;
  293. width: 170rpx;
  294. // width: 216rpx;
  295. margin: 0 40rpx 30rpx 0;
  296. // margin: 0 15rpx 30rpx 0;
  297. border-radius: 8rpx;
  298. background-size: cover;
  299. background-position: center;
  300. background-repeat: no-repeat;
  301. font-weight: 500;
  302. font-size: 32rpx;
  303. color: white;
  304. line-height: 45rpx;
  305. padding: 20rpx;
  306. position: relative;
  307. overflow: hidden;
  308. .industry-video-icon{
  309. height: 0rpx;
  310. width: 0rpx;
  311. border-style: solid;
  312. border-color: #3385FF #3385FF transparent transparent;
  313. border-width: 28rpx;
  314. position: absolute;
  315. right: 0;
  316. top: 0;
  317. image{
  318. position: absolute;
  319. right: -24rpx;
  320. bottom: 0;
  321. height: 20rpx;
  322. width: 20rpx;
  323. }
  324. }
  325. }
  326. .text-box {
  327. margin-bottom: 30rpx;
  328. margin-right: 40rpx;
  329. padding: 0;
  330. font-size: 24rpx;
  331. color: #408fff;
  332. width: 170rpx;
  333. height: 46rpx;
  334. line-height: 46rpx;
  335. text-align: center !important;
  336. background: url(~@/static/img/report_bg.png) no-repeat;
  337. background-size: 100% 100%;
  338. text-indent: 0em;
  339. }
  340. }
  341. }
  342. .resource {
  343. padding: 0 30rpx;
  344. background-color: #fff;
  345. margin-top: 4rpx;
  346. height: 91rpx;
  347. width: 100%;
  348. display: flex;
  349. align-items: center;
  350. justify-content: center;
  351. color: #333333;
  352. font-size: 30rpx;
  353. margin-top: 20rpx;
  354. image {
  355. width: 34rpx;
  356. height: 36rpx;
  357. margin-right: 10rpx;
  358. }
  359. }
  360. .content-report {
  361. .content-item {
  362. background-color: #fff;
  363. padding: 35rpx 20rpx 0;
  364. .item-title {
  365. font-weight: 500;
  366. .item-industry {
  367. margin-left: 10rpx;
  368. color: #3385ff;
  369. display: inline-block;
  370. }
  371. }
  372. .item-user {
  373. display: flex;
  374. align-items: center;
  375. color: #999999;
  376. font-size: 28rpx;
  377. margin-bottom: 20rpx;
  378. image {
  379. width: 23rpx;
  380. height: 26rpx;
  381. margin-right: 20rpx;
  382. }
  383. }
  384. .item-more {
  385. display: flex;
  386. justify-content: space-between;
  387. color: #cecece;
  388. margin: 20rpx 0 0;
  389. padding-bottom: 30rpx;
  390. border-bottom: 1rpx solid #ececec;
  391. .pv-ollect {
  392. display: flex;
  393. align-items: center;
  394. width: 40%;
  395. justify-content: space-between;
  396. image {
  397. width: 22rpx;
  398. height: 21rpx;
  399. margin-right: 10rpx;
  400. }
  401. .pv {
  402. height: 16rpx;
  403. }
  404. }
  405. }
  406. }
  407. }
  408. }
  409. </style>