report.vue 13 KB

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