trainVideoPages.vue 3.7 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135
  1. <template>
  2. <view class="container train-video-pages">
  3. <view class="title-box">
  4. <view class="item">弘则策略首席 马冬凡 主讲</view>
  5. </view>
  6. <view class="ul-content">
  7. <view v-for="item in videoList" :key="item.SourceId" class="global_card_content container-roadshow-item">
  8. <view class="global_title item-title" @click="goDetails">
  9. {{ item.Title }}
  10. </view>
  11. <view class="content-box" @click.stop="handelPlay(item)">
  12. <image :src="item.BackgroundImg"></image>
  13. </view>
  14. <text class="time">{{ item.PublishTime }}</text>
  15. </view>
  16. </view>
  17. <videoModule :showVideoPop.sync="showVideoPop" :curVideoId="curVideoId" :videoPopList="videoPopList" />
  18. </view>
  19. </template>
  20. <script>
  21. import { Reports } from "@/config/api.js";
  22. import videoModule from "@/components/videoModule/index";
  23. export default {
  24. data() {
  25. return {
  26. showVideoPop: false,
  27. showAudioPop: false, //播放音频
  28. videoPopList: {},
  29. videoList: [],
  30. };
  31. },
  32. components: {
  33. videoModule,
  34. // modalDialog,
  35. },
  36. methods: {
  37. //播放的权限判断
  38. async handelPlay(item) {
  39. await this.$store.dispatch("showLoginModal");
  40. if (item.AuthInfo.HasPermission == 1) {
  41. this.handelVideoPlay(item);
  42. }
  43. // else {
  44. // this.hasPermission = item.AuthInfo.HasPermission;
  45. // this.jurisdictionList.ActivityId = item.Id;
  46. // this.jurisdictionList.isAudioVideo = item.Type;
  47. // if (this.hasPermission == 2) {
  48. // this.jurisdictionList.SellerMobile = item.AuthInfo.SellerMobile;
  49. // this.jurisdictionList.SellerName = item.AuthInfo.SellerName;
  50. // this.jurisdictionList.PopupMsg = item.AuthInfo.PopupMsg;
  51. // this.isShowhasPermission = true;
  52. // } else if (this.hasPermission == 3 || this.hasPermission == 4 || this.hasPermission == 5) {
  53. // this.jurisdictionList.PopupMsg = item.AuthInfo.PopupMsg;
  54. // this.applyForIsShow = true;
  55. // }
  56. // }
  57. },
  58. //视频的播放事件
  59. handelVideoPlay(item) {
  60. if (this.$store.state.videoPlay.playVideoId != item.Id) {
  61. this.$store.commit("videoPlay/palyTimeUpdate", 0);
  62. this.$store.commit("videoPlay/playVideo", item.Id);
  63. }
  64. this.globalBgAudioManager.stop();
  65. this.videoPopList = item;
  66. this.showVideoPop = true;
  67. },
  68. async getVideoList(item) {
  69. const res = await Reports.microRoadshowTrainingList();
  70. if (res.Ret === 200) {
  71. this.videoList = res.Data.List;
  72. }
  73. },
  74. },
  75. onLoad() {
  76. this.getVideoList();
  77. },
  78. };
  79. </script>
  80. <style scoped lang="scss">
  81. .train-video-pages {
  82. background-color: #f3f5f9;
  83. word-break: break-all;
  84. .title-box {
  85. display: flex;
  86. align-items: center;
  87. width: 100%;
  88. height: 96rpx;
  89. border-top: 0.5rpx solid #dcdfe6;
  90. border-bottom: 0.5rpx solid #dcdfe6;
  91. padding-left: 25rpx;
  92. background-color: #fff;
  93. font-size: 28rpx;
  94. color: #333;
  95. .item {
  96. padding: 10rpx 25rpx;
  97. border-radius: 100rpx;
  98. background-color: #f8f8fa;
  99. }
  100. }
  101. .ul-content {
  102. display: flex;
  103. flex-wrap: wrap;
  104. padding: 30rpx 25rpx;
  105. justify-content: space-between;
  106. .container-roadshow-item {
  107. background-color: #fff;
  108. width: 340rpx;
  109. height: 440rpx;
  110. margin-bottom: 20rpx;
  111. .content-box {
  112. flex: 1;
  113. height: 228rpx;
  114. background-color: #f0f1f3;
  115. margin: 20rpx 0;
  116. image {
  117. width: 100%;
  118. height: 100%;
  119. }
  120. }
  121. }
  122. .item-title {
  123. height: 105rpx;
  124. }
  125. .time {
  126. font-size: 24rpx;
  127. color: #666;
  128. text-align: right;
  129. }
  130. }
  131. }
  132. </style>