report.vue 18 KB

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