report.vue 19 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517
  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. <view style="display: flex; align-items: center">
  13. <view class="industry-box-left" @click.stop="reportFllow(item.IndustrialManagementId, '弘则')">
  14. <image src="https://hzchart.oss-cn-shanghai.aliyuncs.com/cygx/attention_act.png" v-if="item.IsFollw"></image>
  15. <image src="https://hzchart.oss-cn-shanghai.aliyuncs.com/cygx/attention_icon.png" v-else></image>
  16. </view>
  17. {{ item.IndustryName }}
  18. <image class="hot-icon" v-if="item.IsHot" src="https://hzchart.oss-cn-shanghai.aliyuncs.com/cygx/hot_report.png" mode=""></image>
  19. <image v-if="item.IsNew" src="https://hzchart.oss-cn-shanghai.aliyuncs.com/cygx/new_report.png" mode=""></image>
  20. </view>
  21. <view class="publish">
  22. <text class="reg-hint" v-if="item.IsRed"></text>
  23. {{ item.PublishDate }}
  24. <u-icon name="arrow-right" color="#BDBDBD" size="34"></u-icon>
  25. </view>
  26. </view>
  27. <view class="read-more">
  28. <!-- <text class="text-box text_oneLine" v-for="val in item.IndustrialSubjectList" :key="val.IndustrialSubjectId">
  29. {{ val.SubjectName }}
  30. </text> -->
  31. <view class="industry-video-item" @click.stop="handelVideoPlay(item)" :style="{ 'background-image': 'url(' + item.IndustryVideo.BackgroundImg + ')' }" v-if="item.IndustryVideo">
  32. 5min
  33. <br />
  34. 逻辑解析
  35. <view class="industry-video-icon">
  36. <image src="https://hzstatic.hzinsights.com/cygx/video-right-top-icon.svg"></image>
  37. </view>
  38. </view>
  39. <block v-if="item.IndustrialSubjectList">
  40. <view v-if="item.IndustryVideo" style="display: flex; flex-wrap: wrap; width: 420rpx">
  41. <view v-for="val in item.IndustrialSubjectList.slice(0, 4)" :key="val.IndustrialSubjectId" class="text-box text_oneLine">
  42. {{ val.SubjectName }}
  43. </view>
  44. </view>
  45. <block v-if="item.IndustryVideo && item.IndustrialSubjectList.length > 4">
  46. <view v-for="val in item.IndustrialSubjectList.slice(4)" :key="val.IndustrialSubjectId" class="text-box text_oneLine">
  47. {{ val.SubjectName }}
  48. </view>
  49. </block>
  50. <block v-if="!item.IndustryVideo">
  51. <view v-for="val in item.IndustrialSubjectList" :key="val.IndustrialSubjectId" class="text-box text_oneLine">
  52. {{ val.SubjectName }}
  53. </view>
  54. </block>
  55. </block>
  56. </view>
  57. </view>
  58. </block>
  59. <block v-if="reportPageData.ListYxResource.length">
  60. <view class="resource">
  61. <image src="https://hzchart.oss-cn-shanghai.aliyuncs.com/cygx/czbk/zybico.jpg"></image>
  62. <text>买方研选主题</text>
  63. </view>
  64. <text style="height: 1rpx; background: #ececec"></text>
  65. <view class="list-ui" v-for="item in reportPageData.ListYxResource" :key="item.IndustrialManagementId" @click="themeDetails(item)">
  66. <view class="item-title">
  67. <view style="display: flex; align-items: center">
  68. <view class="industry-box-left" @click.stop="reportFllow(item.IndustrialManagementId, '研选')">
  69. <image src="https://hzchart.oss-cn-shanghai.aliyuncs.com/cygx/attention_act.png" v-if="item.IsFollw"></image>
  70. <image src="https://hzchart.oss-cn-shanghai.aliyuncs.com/cygx/attention_icon.png" v-else></image>
  71. </view>
  72. {{ item.IndustryName }}
  73. <image class="hot-icon" v-if="item.IsHot" src="https://hzchart.oss-cn-shanghai.aliyuncs.com/cygx/hot_report.png" mode=""></image>
  74. <image v-if="item.IsNew" src="https://hzchart.oss-cn-shanghai.aliyuncs.com/cygx/new_report.png" mode=""></image>
  75. </view>
  76. <view class="publish">
  77. {{ item.PublishDate }}更新
  78. <u-icon name="arrow-right" color="#BDBDBD" size="34"></u-icon>
  79. </view>
  80. </view>
  81. <view class="read-more" v-if="item.IndustrialSubjectList">
  82. <text class="text-box text_oneLine" v-for="val in item.IndustrialSubjectList" :key="val.IndustrialSubjectId">
  83. {{ val.SubjectName }}
  84. </text>
  85. <!-- <view class="industry-video-item" @click.stop="handelVideoPlay(item)"
  86. :style="{'background-image':'url('+item.IndustryVideo.BackgroundImg+ ')'}" v-if="item.IndustryVideo">
  87. 5min
  88. <br />
  89. 逻辑解析
  90. <view class="industry-video-icon">
  91. <image src="https://hzstatic.hzinsights.com/cygx/video-right-top-icon.svg"></image>
  92. </view>
  93. </view>
  94. <view v-if="item.IndustryVideo" style="display: flex;flex-wrap: wrap;width: 420rpx;">
  95. <view v-for="val in item.IndustrialSubjectList.slice(0,4)" :key="val.IndustrialSubjectId" class="text-box text_oneLine">
  96. {{ val.SubjectName }}
  97. </view>
  98. </view>
  99. <block v-if="item.IndustryVideo && item.IndustrialSubjectList.length>4">
  100. <view v-for="val in item.IndustrialSubjectList.slice(4)" :key="val.IndustrialSubjectId" class="text-box text_oneLine">
  101. {{ val.SubjectName }}
  102. </view>
  103. </block>
  104. <block v-if="!item.IndustryVideo">
  105. <view v-for="val in item.IndustrialSubjectList" :key="val.IndustrialSubjectId" class="text-box text_oneLine">
  106. {{ val.SubjectName }}
  107. </view>
  108. </block> -->
  109. </view>
  110. </view>
  111. </block>
  112. </view>
  113. <view class="content-report">
  114. <block v-if="reportPageData.ListYxReport.length">
  115. <view class="resource">
  116. <image src="https://hzchart.oss-cn-shanghai.aliyuncs.com/cygx/czbk/report_Yx.png"></image>
  117. <text>买方研选报告</text>
  118. </view>
  119. <text style="height: 1rpx; background: #ececec"></text>
  120. <view class="content-item" v-for="item in reportPageData.ListYxReport" :key="item.ArticleId">
  121. <view class="item-user">
  122. <image src="https://hzchart.oss-cn-shanghai.aliyuncs.com/cygx/czbk/user_report.png"></image>
  123. <text> {{ item.NickName }}</text>
  124. </view>
  125. <view class="item-title">
  126. <text style="display: inline" @click="goDetailReport(item)">
  127. {{ item.Title }}
  128. </text>
  129. <text class="item-industry" v-if="item.IndustryName" @click="themeDetails(item)">&nbsp;&nbsp;&nbsp;#{{ item.IndustryName }}</text>
  130. </view>
  131. <view class="item-more">
  132. <text>{{ item.PublishDate }}</text>
  133. <view class="pv-ollect">
  134. <view>
  135. <image class="pv" src="https://hzchart.oss-cn-shanghai.aliyuncs.com/cygx/czbk/examine_icon.png"></image>
  136. {{ item.Pv }}
  137. </view>
  138. <view @click="collectClick(item)">
  139. <image v-if="item.IsCollect" src="https://hzchart.oss-cn-shanghai.aliyuncs.com/cygx/czbk/collect_act.png"></image>
  140. <image v-else src="https://hzchart.oss-cn-shanghai.aliyuncs.com/cygx/czbk/collect_ico.png"></image>
  141. {{ item.CollectNum }}人收藏
  142. </view>
  143. </view>
  144. </view>
  145. </view>
  146. </block>
  147. <block v-if="reportPageData.ListHzReport.length">
  148. <view class="resource">
  149. <image src="https://hzchart.oss-cn-shanghai.aliyuncs.com/cygx/czbk/report_Hz.png"></image>
  150. <text>弘则报告</text>
  151. </view>
  152. <text style="height: 1rpx; background: #ececec"></text>
  153. <view class="content-item" v-for="item in reportPageData.ListHzReport" :key="item.ArticleId">
  154. <view class="item-title">
  155. <text style="display: inline" @click="goDetailReport(item)">
  156. {{ item.Title }}
  157. </text>
  158. <text class="item-industry" @click="themeDetails(item)" v-if="item.IndustryName">&nbsp;&nbsp;&nbsp;#{{ item.IndustryName }}</text>
  159. </view>
  160. <view class="item-more">
  161. <text>{{ item.PublishDate }}</text>
  162. </view>
  163. </view>
  164. </block>
  165. </view>
  166. <u-modal
  167. v-model="goFollowShow"
  168. :content-style="{ fontSize: '32rpx' }"
  169. @confirm="goFollowShowBtn"
  170. :show-cancel-button="isCancelBtn"
  171. :confirm-text="confirmText"
  172. @cancel="isCancelBtn = false"
  173. :show-title="false"
  174. :cancel-style="{ borderRight: '1rpx solid #EBEBEB' }"
  175. :confirm-style="{ fontWeight: '700' }"
  176. >
  177. <view class="slot-content">
  178. <rich-text :nodes="accounts"></rich-text>
  179. </view>
  180. </u-modal>
  181. <!-- 视频模块 -->
  182. <videoModule :showVideoPop="showVideoPop" :videoPopList="videoPopList" class="industry-video-module" />
  183. <!-- 权限弹窗 -->
  184. <modalDialog :isShowhasPermission="isShowhasPermission" :applyForIsShow="applyForIsShow" :jurisdictionList="jurisdictionList" :hasPermission="hasPermission" />
  185. </view>
  186. </template>
  187. <script>
  188. import { Report, Reports } from "@/config/api";
  189. import videoModule from "@/components/videoModule/index";
  190. import modalDialog from "@/components/modalDialog.vue";
  191. export default {
  192. components: { videoModule, modalDialog },
  193. props: {
  194. reportPageData: {
  195. type: Object,
  196. },
  197. },
  198. data() {
  199. return {
  200. goFollowShow: false,
  201. confirmText: "知道了",
  202. isCancelBtn: false,
  203. accounts: "",
  204. showVideoPop: false, //视频弹窗显示控制
  205. videoPopList: {}, // 视频信息
  206. isShowhasPermission: false, // 联系销售的提交申请
  207. applyForIsShow: false, // 提交申请
  208. jurisdictionList: {},
  209. hasPermission: "", //权限
  210. };
  211. },
  212. watch: {},
  213. methods: {
  214. //去往文章详情页面
  215. goDetailReport(item) {
  216. this.$store.dispatch("checkHandle", "/pageMy/reportDetail/reportDetail?id=" + item.ArticleId);
  217. },
  218. /* 进入详情 校验是否有该品种权限 */
  219. goDetail(item) {
  220. uni.navigateTo({
  221. url: "/reportPages/IndustryReport/IndustryReport?id=" + item.IndustrialManagementId,
  222. });
  223. },
  224. //去往主题详情
  225. themeDetails(item) {
  226. if (item.Source === 1) {
  227. //非严选
  228. this.$store.dispatch("checkHandle", "/reportPages/IndustryReport/IndustryReport?id=" + item.IndustrialManagementId);
  229. } else {
  230. //严选
  231. this.$store.dispatch("checkHandle", "/reportPages/researchTheme/researchTheme?id=" + item.IndustrialManagementId);
  232. }
  233. },
  234. //收藏
  235. async collectClick(item) {
  236. const res = await Report.collectRpt({ ArticleId: item.ArticleId, PageRouter: this.$store.state.pageRouterReport });
  237. if (res.Ret === 200) {
  238. item.IsCollect = !item.IsCollect;
  239. item.IsCollect
  240. ? (item.CollectNum += 1) &&
  241. uni.showToast({
  242. title: "收藏成功",
  243. icon: "none",
  244. duration: 2000,
  245. })
  246. : (item.CollectNum -= 1);
  247. !item.IsCollect &&
  248. uni.showToast({
  249. title: "已取消收藏",
  250. icon: "none",
  251. duration: 2000,
  252. });
  253. }
  254. },
  255. //点击关注的图标
  256. reportFllow(id, type) {
  257. if (!this.$store.state.isAuth && !this.$store.state.isBind) {
  258. Reports.reportFllow({
  259. IndustrialManagementId: id,
  260. PageRouter: "搜索关注",
  261. }).then((res) => {
  262. if (res.Ret === 200) {
  263. if (res.Data.Status == 1) {
  264. this.goFollowShow = true;
  265. this.confirmText = res.Data.GoFollow ? "去关注" : "知道了";
  266. if (res.Data.GoFollow) {
  267. this.accounts = `产业关注成功 <br> 想要及时获取该产业内容的更新推送,请关注【查研观向小助手】公众号`;
  268. this.isCancelBtn = true;
  269. } else {
  270. this.accounts = "产业关注成功<br>请关注【查研观向小助手】公众号,及时获取产业报告更新提醒";
  271. }
  272. }
  273. this.$emit("updateFllow", id, type);
  274. }
  275. });
  276. } else if (this.$store.state.isAuth) {
  277. //未授权
  278. uni.navigateTo({
  279. url: "/pageMy/authGuide/authGuide",
  280. });
  281. } else if (!this.$store.state.isAuth && this.$store.state.isBind) {
  282. //已授权未绑定
  283. uni.navigateTo({
  284. url: "/pageMy/login/login",
  285. });
  286. }
  287. },
  288. //点击了去关注
  289. goFollowShowBtn() {
  290. if (this.confirmText == "去关注") {
  291. uni.navigateTo({
  292. url: "/activityPages/accountsOfficial/accountsOfficial",
  293. });
  294. }
  295. this.goFollowShow = false;
  296. },
  297. // 播放权限判断
  298. handelVideoPlay(item) {
  299. if (!this.$store.state.isAuth && !this.$store.state.isBind) {
  300. if (item.AuthInfo.HasPermission == 1) {
  301. this.playVideo(item);
  302. } else {
  303. this.hasPermission = item.AuthInfo.HasPermission;
  304. this.jurisdictionList.ActivityId = item.IndustryVideo.Id;
  305. // 产业视频
  306. this.jurisdictionList.isAudioVideo = 3;
  307. if (this.hasPermission == 2) {
  308. this.jurisdictionList.SellerMobile = item.AuthInfo.SellerMobile;
  309. this.jurisdictionList.SellerName = item.AuthInfo.SellerName;
  310. this.jurisdictionList.PopupMsg = item.AuthInfo.PopupMsg;
  311. this.isShowhasPermission = true;
  312. } else if (this.hasPermission == 3 || this.hasPermission == 4 || this.hasPermission == 5) {
  313. this.jurisdictionList.PopupMsg = item.AuthInfo.PopupMsg;
  314. this.applyForIsShow = true;
  315. }
  316. }
  317. } else {
  318. this.$store.dispatch("checkHandle");
  319. }
  320. },
  321. playVideo(item) {
  322. let params = {
  323. Id: item.IndustryVideo.Id,
  324. ResourceUrl: item.IndustryVideo.ResourceUrl,
  325. BackgroundImg: item.IndustryVideo.BackgroundImg,
  326. Title: `5min【${item.IndustryName}】逻辑解析`,
  327. };
  328. if (this.$store.state.videoPlay.playVideoId != item.Id) {
  329. this.$store.commit("videoPlay/palyTimeUpdate", 0);
  330. this.$store.commit("videoPlay/playVideo", item.Id);
  331. }
  332. this.globalBgAudioManager.stop();
  333. this.videoPopList = params;
  334. this.showVideoPop = true;
  335. },
  336. },
  337. };
  338. </script>
  339. <style scoped lang="scss">
  340. .container-report-page {
  341. background-color: #f5f6fa;
  342. .content-list {
  343. .list-ui {
  344. background-color: #fff;
  345. margin-top: 2rpx;
  346. }
  347. .item-title {
  348. display: flex;
  349. align-items: center;
  350. justify-content: space-between;
  351. height: 100rpx;
  352. border-bottom: 1px solid #f6f6f6;
  353. padding: 0 30rpx;
  354. background-color: #fff;
  355. .publish {
  356. position: relative;
  357. display: flex;
  358. align-items: center;
  359. color: #999999;
  360. font-style: 26rpx;
  361. padding-left: 30rpx;
  362. .reg-hint {
  363. position: absolute;
  364. top: 50%;
  365. left: 0rpx;
  366. width: 14rpx;
  367. height: 14rpx;
  368. transform: translateY(-50%);
  369. background-color: #ff0000;
  370. border-radius: 50%;
  371. }
  372. }
  373. image {
  374. margin-left: 10rpx;
  375. width: 60rpx;
  376. height: 30rpx;
  377. }
  378. .hot-icon {
  379. width: 30rpx;
  380. }
  381. .industry-box-left {
  382. width: 50rpx;
  383. display: flex;
  384. align-items: center;
  385. margin-right: 10rpx;
  386. image {
  387. width: 38rpx;
  388. height: 34rpx;
  389. }
  390. }
  391. }
  392. .read-more {
  393. margin-top: 20rpx;
  394. display: flex;
  395. flex-wrap: wrap;
  396. margin-left: 80rpx;
  397. .industry-video-item {
  398. height: 126rpx;
  399. width: 170rpx;
  400. // width: 216rpx;
  401. margin: 0 40rpx 30rpx 0;
  402. // margin: 0 15rpx 30rpx 0;
  403. border-radius: 8rpx;
  404. background-size: cover;
  405. background-position: center;
  406. background-repeat: no-repeat;
  407. font-weight: 500;
  408. font-size: 32rpx;
  409. color: white;
  410. line-height: 45rpx;
  411. padding: 20rpx;
  412. position: relative;
  413. overflow: hidden;
  414. .industry-video-icon {
  415. height: 0rpx;
  416. width: 0rpx;
  417. border-style: solid;
  418. border-color: #3385ff #3385ff transparent transparent;
  419. border-width: 28rpx;
  420. position: absolute;
  421. right: 0;
  422. top: 0;
  423. image {
  424. position: absolute;
  425. right: -24rpx;
  426. bottom: 0;
  427. height: 20rpx;
  428. width: 20rpx;
  429. }
  430. }
  431. }
  432. .text-box {
  433. margin-bottom: 30rpx;
  434. margin-right: 40rpx;
  435. padding: 0;
  436. font-size: 24rpx;
  437. color: #408fff;
  438. width: 170rpx;
  439. height: 46rpx;
  440. line-height: 46rpx;
  441. text-align: center !important;
  442. background: url(~@/static/img/report_bg.png) no-repeat;
  443. background-size: 100% 100%;
  444. text-indent: 0em;
  445. }
  446. }
  447. }
  448. .resource {
  449. padding: 0 30rpx;
  450. background-color: #fff;
  451. margin-top: 4rpx;
  452. height: 91rpx;
  453. width: 100%;
  454. display: flex;
  455. align-items: center;
  456. justify-content: center;
  457. color: #333333;
  458. font-size: 30rpx;
  459. margin-top: 20rpx;
  460. image {
  461. width: 34rpx;
  462. height: 36rpx;
  463. margin-right: 10rpx;
  464. }
  465. }
  466. .content-report {
  467. .content-item {
  468. background-color: #fff;
  469. padding: 35rpx 20rpx 0;
  470. .item-title {
  471. font-weight: 500;
  472. .item-industry {
  473. margin-left: 10rpx;
  474. color: #3385ff;
  475. display: inline-block;
  476. }
  477. }
  478. .item-user {
  479. display: flex;
  480. align-items: center;
  481. color: #999999;
  482. font-size: 28rpx;
  483. margin-bottom: 20rpx;
  484. image {
  485. width: 23rpx;
  486. height: 26rpx;
  487. margin-right: 20rpx;
  488. }
  489. }
  490. .item-more {
  491. display: flex;
  492. justify-content: space-between;
  493. color: #cecece;
  494. margin: 20rpx 0 0;
  495. padding-bottom: 30rpx;
  496. border-bottom: 1rpx solid #ececec;
  497. .pv-ollect {
  498. display: flex;
  499. align-items: center;
  500. width: 40%;
  501. justify-content: space-between;
  502. image {
  503. width: 22rpx;
  504. height: 21rpx;
  505. margin-right: 10rpx;
  506. }
  507. .pv {
  508. height: 16rpx;
  509. }
  510. }
  511. }
  512. }
  513. }
  514. }
  515. </style>