学员端小程序
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

151 lines
3.3 KiB

1 year ago
1 year ago
1 year ago
1 year ago
1 year ago
  1. <template>
  2. <view class="pageBgImg">
  3. <view class="videoBox">
  4. <view class="back">
  5. <topNavbar title=""></topNavbar>
  6. </view>
  7. <video :src="vdoDetail.videoUrl" :poster="vdoDetail.videoCover"></video>
  8. </view>
  9. <view class="pad">
  10. <view class="card" style="margin: 28rpx 0 24rpx 0;">
  11. <view class="info">
  12. <view class="name">{{vdoDetail.title}}</view>
  13. <view class="date">{{ $u.timeFormat(vdoDetail.createTime, 'yyyy/mm/dd') }}</view>
  14. </view>
  15. </view>
  16. <view class="operate">
  17. <view class="operateItem">
  18. <view class="icon">
  19. <image src="/static/images/index/dianzan_nor.png" mode=""></image>
  20. <!-- <image src="/static/images/index/dianzan_cli.png" mode=""></image> -->
  21. </view>
  22. <view class="txt">点赞</view>
  23. </view>
  24. <view class="operateItem">
  25. <view class="icon">
  26. <image src="/static/images/index/shoucang_nor.png" mode=""></image>
  27. <!-- <image src="/static/images/index/shoucang_cli.png" mode=""></image> -->
  28. </view>
  29. <view class="txt">收藏</view>
  30. </view>
  31. <view class="operateItem">
  32. <view class="icon">
  33. <image src="/static/images/index/fenxiang_nor.png" mode=""></image>
  34. </view>
  35. <view class="txt">分享</view>
  36. </view>
  37. </view>
  38. <view class="videolist">
  39. <view class="flex-b">
  40. <view class="h1">相关推荐</view>
  41. <moreRight text="更多"></moreRight>
  42. </view>
  43. <view class="ul">
  44. <view class="li" v-for="(item,index) in 10" :key="index" @click="$goPage('/pages/indexEntry/publicVideo/videoDetail/videoDetail')">
  45. <videoItem></videoItem>
  46. </view>
  47. </view>
  48. </view>
  49. </view>
  50. </view>
  51. </template>
  52. <script>
  53. import videoItem from '../comp/videoItem'
  54. import { publicGetvideo } from '@/config/api.js'
  55. export default {
  56. components: { videoItem },
  57. data() {
  58. return {
  59. id: '',
  60. vdoDetail: {}
  61. }
  62. },
  63. onLoad(options) {
  64. this.id = options.id
  65. this.publicGetvideoFn()
  66. },
  67. methods: {
  68. async publicGetvideoFn() {
  69. const {data: res} = await publicGetvideo({id: this.id})
  70. this.vdoDetail = res
  71. console.log(res)
  72. }
  73. }
  74. }
  75. </script>
  76. <style lang="scss" scoped>
  77. .h1 {
  78. line-height: 100rpx;
  79. }
  80. .info {
  81. padding: 28rpx;
  82. .name {
  83. font-size: 34rpx;
  84. color: #363A44;
  85. font-weight: 500;
  86. }
  87. .date {
  88. font-size: 28rpx;
  89. color: #686B73;
  90. margin-top: 4rpx;
  91. }
  92. }
  93. .operate {
  94. display: flex;
  95. justify-content: space-between;
  96. .operateItem {
  97. width: 188rpx;
  98. height: 132rpx;
  99. background: #FFFFFF;
  100. border-radius: 16rpx;
  101. display: flex;
  102. flex-direction: column;
  103. align-items: center;
  104. justify-content: center;
  105. .icon {
  106. width: 48rpx;
  107. height: 48rpx;
  108. }
  109. .txt {
  110. font-size: 24rpx;
  111. color: #333;
  112. font-weight: 500;
  113. }
  114. }
  115. }
  116. .videoBox {
  117. width: 100%;
  118. height: 492rpx;
  119. position: relative;
  120. .back {
  121. position: absolute;
  122. left: 0;
  123. top: 0;
  124. }
  125. video {
  126. width: 100%;
  127. height: 100%;
  128. display: block;
  129. }
  130. }
  131. .ul {
  132. width: 100%;
  133. display: flex;
  134. justify-content: space-between;
  135. flex-wrap: wrap;
  136. .li {
  137. width: 100%;
  138. width: 48%;
  139. height: 260rpx;
  140. background: #FFFFFF;
  141. box-shadow: 0px 8rpx 20rpx 0px rgba(0,0,0,0.04), 2rpx 2rpx 8rpx 0px rgba(0,0,0,0.06);
  142. border-radius: 16rpx;
  143. margin-bottom: 24rpx;
  144. padding: 16rpx;
  145. }
  146. }
  147. </style>