report.vue 17 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483
  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)">
  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>
  131. </block>
  132. </view>
  133. <u-modal
  134. v-model="goFollowShow"
  135. :content-style="{ fontSize: '32rpx' }"
  136. @confirm="goFollowShowBtn"
  137. :show-cancel-button="isCancelBtn"
  138. :confirm-text="confirmText"
  139. @cancel="isCancelBtn = false"
  140. :show-title="false"
  141. :cancel-style="{ borderRight: '1rpx solid #EBEBEB' }"
  142. :confirm-style="{ fontWeight: '700' }"
  143. >
  144. <view class="slot-content">
  145. <rich-text :nodes="accounts"></rich-text>
  146. </view>
  147. </u-modal>
  148. <!-- 视频模块 -->
  149. <videoModule :showVideoPop.sync="showVideoPop" :videoPopList="videoPopList" class="industry-video-module" />
  150. <!-- 权限弹窗 -->
  151. <modalDialog :isShowhasPermission="isShowhasPermission" :applyForIsShow="applyForIsShow" :jurisdictionList="jurisdictionList" :hasPermission="hasPermission" />
  152. </view>
  153. </template>
  154. <script>
  155. import { Report, Reports } from "@/config/api";
  156. import videoModule from "@/components/videoModule/index";
  157. import modalDialog from "@/components/modalDialog.vue";
  158. export default {
  159. components: { videoModule, modalDialog },
  160. props: {
  161. reportPageData: {
  162. type: Object,
  163. },
  164. },
  165. data() {
  166. return {
  167. goFollowShow: false,
  168. confirmText: "知道了",
  169. isCancelBtn: false,
  170. accounts: "",
  171. showVideoPop: false, //视频弹窗显示控制
  172. videoPopList: {}, // 视频信息
  173. isShowhasPermission: false, // 联系销售的提交申请
  174. applyForIsShow: false, // 提交申请
  175. jurisdictionList: {},
  176. hasPermission: "", //权限
  177. };
  178. },
  179. watch: {},
  180. methods: {
  181. //去往文章详情页面
  182. goDetailReport(item) {
  183. uni.navigateTo({ url: "/pageMy/reportDetail/reportDetail?id=" + item.ArticleId });
  184. },
  185. /* 进入详情 校验是否有该品种权限 */
  186. goDetail(item) {
  187. uni.navigateTo({
  188. url: "/reportPages/IndustryReport/IndustryReport?id=" + item.IndustrialManagementId,
  189. });
  190. },
  191. //去往主题详情
  192. themeDetails(item) {
  193. if (item.Source === 1) {
  194. //非严选
  195. uni.navigateTo({ url: "/reportPages/IndustryReport/IndustryReport?id=" + item.IndustrialManagementId });
  196. } else {
  197. //严选
  198. uni.navigateTo({ url: "/reportPages/researchTheme/researchTheme?id=" + item.IndustrialManagementId });
  199. }
  200. },
  201. //收藏
  202. async collectClick(item) {
  203. const res = await Report.collectRpt({ ArticleId: item.ArticleId, PageRouter: this.$store.state.pageRouterReport });
  204. if (res.Ret === 200) {
  205. item.IsCollect = !item.IsCollect;
  206. item.IsCollect
  207. ? (item.CollectNum += 1) &&
  208. uni.showToast({
  209. title: "收藏成功",
  210. icon: "none",
  211. duration: 2000,
  212. })
  213. : (item.CollectNum -= 1);
  214. !item.IsCollect &&
  215. uni.showToast({
  216. title: "已取消收藏",
  217. icon: "none",
  218. duration: 2000,
  219. });
  220. }
  221. },
  222. //点击关注的图标
  223. reportFllow(id, type) {
  224. if (!this.$store.state.isAuth && !this.$store.state.isBind) {
  225. Reports.reportFllow({
  226. IndustrialManagementId: id,
  227. PageRouter: "搜索关注",
  228. }).then((res) => {
  229. if (res.Ret === 200) {
  230. if (res.Data.Status == 1) {
  231. this.goFollowShow = true;
  232. this.confirmText = res.Data.GoFollow ? "去关注" : "知道了";
  233. if (res.Data.GoFollow) {
  234. this.accounts = `产业关注成功 <br> 想要及时获取该产业内容的更新推送,请关注【查研观向小助手】公众号`;
  235. this.isCancelBtn = true;
  236. } else {
  237. this.accounts = "产业关注成功<br>请关注【查研观向小助手】公众号,及时获取产业报告更新提醒";
  238. }
  239. }
  240. this.$emit("updateFllow", id, type);
  241. }
  242. });
  243. } else if (this.$store.state.isAuth) {
  244. //未授权
  245. uni.navigateTo({
  246. url: "/pageMy/authGuide/authGuide",
  247. });
  248. } else if (!this.$store.state.isAuth && this.$store.state.isBind) {
  249. //已授权未绑定
  250. uni.navigateTo({
  251. url: "/pageMy/login/login",
  252. });
  253. }
  254. },
  255. //点击了去关注
  256. goFollowShowBtn() {
  257. if (this.confirmText == "去关注") {
  258. uni.navigateTo({
  259. url: "/activityPages/accountsOfficial/accountsOfficial",
  260. });
  261. }
  262. this.goFollowShow = false;
  263. },
  264. // 播放权限判断
  265. async handelVideoPlay(item) {
  266. await this.$store.dispatch("showLoginModal");
  267. if (item.AuthInfo.HasPermission == 1) {
  268. this.playVideo(item);
  269. } else {
  270. this.hasPermission = item.AuthInfo.HasPermission;
  271. this.jurisdictionList.ActivityId = item.IndustryVideo.Id;
  272. // 产业视频
  273. this.jurisdictionList.isAudioVideo = 3;
  274. if (this.hasPermission == 2) {
  275. this.jurisdictionList.SellerMobile = item.AuthInfo.SellerMobile;
  276. this.jurisdictionList.SellerName = item.AuthInfo.SellerName;
  277. this.jurisdictionList.PopupMsg = item.AuthInfo.PopupMsg;
  278. this.isShowhasPermission = true;
  279. } else if (this.hasPermission == 3 || this.hasPermission == 4 || this.hasPermission == 5) {
  280. this.jurisdictionList.PopupMsg = item.AuthInfo.PopupMsg;
  281. this.applyForIsShow = true;
  282. }
  283. }
  284. },
  285. playVideo(item) {
  286. let params = {
  287. Id: item.IndustryVideo.Id,
  288. ResourceUrl: item.IndustryVideo.ResourceUrl,
  289. BackgroundImg: item.IndustryVideo.BackgroundImg,
  290. Title: `5min【${item.IndustryName}】逻辑解析`,
  291. };
  292. if (this.$store.state.videoPlay.playVideoId != item.Id) {
  293. this.$store.commit("videoPlay/palyTimeUpdate", 0);
  294. this.$store.commit("videoPlay/playVideo", item.Id);
  295. }
  296. this.globalBgAudioManager.stop();
  297. this.videoPopList = params;
  298. this.showVideoPop = true;
  299. },
  300. },
  301. };
  302. </script>
  303. <style scoped lang="scss">
  304. .container-report-page {
  305. background-color: $uni-bg-color;
  306. padding: 0 24rpx;
  307. .content-list {
  308. .list-ui {
  309. background-color: #fff;
  310. margin-top: 2rpx;
  311. margin-bottom: 20rpx;
  312. }
  313. .item-title {
  314. display: flex;
  315. align-items: center;
  316. justify-content: space-between;
  317. height: 100rpx;
  318. border-bottom: 1px solid #f6f6f6;
  319. padding: 0 30rpx;
  320. background-color: #fff;
  321. image {
  322. margin-left: 10rpx;
  323. width: 60rpx;
  324. height: 30rpx;
  325. }
  326. }
  327. .read-more {
  328. display: flex;
  329. flex-wrap: wrap;
  330. .industry-video-item {
  331. height: 106rpx;
  332. width: 150rpx;
  333. margin: 0 10rpx 10rpx 0;
  334. border-radius: 8rpx;
  335. background-size: cover;
  336. background-position: center;
  337. background-repeat: no-repeat;
  338. font-weight: 500;
  339. font-size: 32rpx;
  340. color: white;
  341. line-height: 45rpx;
  342. padding: 20rpx;
  343. position: relative;
  344. overflow: hidden;
  345. .industry-video-icon {
  346. height: 0rpx;
  347. width: 0rpx;
  348. border-style: solid;
  349. border-color: #376cbb #376cbb transparent transparent;
  350. border-width: 28rpx;
  351. position: absolute;
  352. right: 0;
  353. top: 0;
  354. image {
  355. position: absolute;
  356. right: -24rpx;
  357. bottom: 0;
  358. height: 20rpx;
  359. width: 20rpx;
  360. }
  361. }
  362. }
  363. .text-box {
  364. padding: 0;
  365. margin: 0 10rpx 10rpx 0;
  366. font-size: 24rpx;
  367. color: $uni-color-new;
  368. width: 150rpx;
  369. height: 48rpx;
  370. text-indent: 0em;
  371. line-height: 48rpx;
  372. text-align: center;
  373. background-color: #f8f8fa;
  374. border-radius: 200rpx;
  375. }
  376. }
  377. }
  378. .resource {
  379. display: flex;
  380. align-items: center;
  381. height: 66rpx;
  382. width: 100%;
  383. image {
  384. width: 34rpx;
  385. height: 36rpx;
  386. margin-right: 10rpx;
  387. }
  388. }
  389. .content-report {
  390. .content-item {
  391. background-color: #fff;
  392. padding: 20rpx;
  393. margin-bottom: 20rpx;
  394. border-top: 4rpx solid #376cbb;
  395. .item-title {
  396. font-weight: 500;
  397. position: relative;
  398. .item-industry {
  399. text-indent: 0;
  400. margin-right: 10rpx;
  401. color: #376cbb;
  402. display: inline-block;
  403. }
  404. }
  405. .item-user {
  406. display: flex;
  407. align-items: center;
  408. color: #999999;
  409. font-size: 24rpx;
  410. margin-bottom: 10rpx;
  411. margin-top: -10rpx;
  412. image {
  413. width: 24rpx;
  414. height: 24rpx;
  415. margin-right: 20rpx;
  416. }
  417. }
  418. .item-more {
  419. display: flex;
  420. justify-content: space-between;
  421. color: #cecece;
  422. margin-top: 20rpx;
  423. }
  424. }
  425. }
  426. .industry-content {
  427. display: flex;
  428. align-items: center;
  429. justify-content: space-between;
  430. margin-bottom: 15rpx;
  431. .industry-box-left {
  432. display: flex;
  433. align-items: center;
  434. .follw {
  435. color: #fff;
  436. border-radius: 4rpx;
  437. font-size: 24rpx;
  438. width: 110rpx;
  439. height: 42rpx;
  440. margin-right: 10rpx;
  441. background-color: $uni-color-new;
  442. }
  443. }
  444. .ndustry-box-tiem {
  445. font-size: 24rpx;
  446. color: #999;
  447. .read {
  448. width: 14rpx;
  449. height: 14rpx;
  450. background-color: #ff0000;
  451. border-radius: 50%;
  452. margin-right: 10rpx;
  453. }
  454. .ndustry-box-text {
  455. margin: 0 10rpx;
  456. }
  457. }
  458. }
  459. .follw-image {
  460. width: 32rpx;
  461. height: 32rpx;
  462. margin-right: 10rpx;
  463. }
  464. .title-content-box {
  465. display: flex;
  466. .tag {
  467. width: 126rpx;
  468. height: 42rpx;
  469. color: #928563;
  470. font-size: 24rpx;
  471. font-weight: 500;
  472. border-radius: 38rpx;
  473. background-color: #f2e8cc;
  474. flex-shrink: 0;
  475. margin-right: 10rpx;
  476. }
  477. }
  478. }
  479. </style>