report.vue 17 KB

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