report.vue 18 KB

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