景徳镇旅游微信小程序
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.

152 lines
2.8 KiB

9 months ago
8 months ago
9 months ago
8 months ago
9 months ago
8 months ago
9 months ago
8 months ago
9 months ago
8 months ago
8 months ago
8 months ago
9 months ago
8 months ago
9 months ago
9 months ago
8 months ago
8 months ago
8 months ago
8 months ago
8 months ago
8 months ago
9 months ago
9 months ago
9 months ago
  1. <template>
  2. <scroll-view
  3. scroll-y="true"
  4. :style="{height: height}"
  5. @scrolltolower="loadMoreData">
  6. <view class="videoList">
  7. <view class="video-item" v-for="(item, index) in list" :key="index"
  8. @click="showVideo(item)">
  9. <view class="image">
  10. <image :src="item.videoImage" mode="aspectFill">
  11. </image>
  12. <view class="icon">
  13. <uv-icon size="35rpx" name="play-right-fill">
  14. </uv-icon>
  15. </view>
  16. </view>
  17. <view class="bottom">
  18. <view class="headImage">
  19. <!-- <image src="https://img-s-msn-com.akamaized.net/tenant/amp/entityid/BB1msKSi.img" mode="aspectFill">
  20. </image> -->
  21. {{ item.videoTitle }}
  22. </view>
  23. <view class="like">
  24. <uv-icon size="45rpx" v-if="false" name="heart"></uv-icon>
  25. <uv-icon size="45rpx" color="#FF4340" v-else name="heart-fill"></uv-icon>
  26. {{ item.videoThumpup }}
  27. </view>
  28. </view>
  29. </view>
  30. </view>
  31. </scroll-view>
  32. </template>
  33. <script>
  34. export default {
  35. props : {
  36. height : {
  37. default : 'auto'
  38. },
  39. roleId : {
  40. }
  41. },
  42. data() {
  43. return {
  44. queryParams: {
  45. pageNo: 1,
  46. pageSize: 10,
  47. },
  48. total : 0,
  49. list : [],
  50. }
  51. },
  52. methods: {
  53. showVideo(item){
  54. this.$utils.hanldePreview
  55. },
  56. queryVideoList(){
  57. if(this.roleId){
  58. this.queryParams.roleInfoId = this.roleId
  59. }
  60. let url = this.roleId ? 'queryVedioBySpot' : 'queryVideoList'
  61. this.$api('queryVedioBySpot', this.queryParams, res => {
  62. if(res.code == 200){
  63. this.list = res.result.records
  64. this.total = res.result.total
  65. }
  66. })
  67. },
  68. loadMoreData(){
  69. if(this.queryParams.pageSize < this.total){
  70. this.queryParams.pageSize += 10
  71. this.queryVideoList()
  72. }
  73. },
  74. }
  75. }
  76. </script>
  77. <style scoped lang="scss">
  78. .videoList {
  79. display: flex;
  80. flex-wrap: wrap;
  81. .video-item {
  82. margin: 20rpx;
  83. width: 335rpx;
  84. .image {
  85. position: relative;
  86. width: 100%;
  87. height: 420rpx;
  88. border-radius: 30rpx;
  89. overflow: hidden;
  90. image {
  91. width: 100%;
  92. height: 100%;
  93. }
  94. .icon {
  95. position: absolute;
  96. right: 30rpx;
  97. top: 30rpx;
  98. width: 60rpx;
  99. height: 60rpx;
  100. background-color: #ffffffaa;
  101. border-radius: 50%;
  102. display: flex;
  103. justify-content: center;
  104. align-items: center;
  105. }
  106. }
  107. .bottom {
  108. padding: 10rpx 0;
  109. font-size: 22rpx;
  110. display: flex;
  111. justify-content: space-between;
  112. .headImage {
  113. display: flex;
  114. align-items: center;
  115. image {
  116. width: 50rpx;
  117. height: 50rpx;
  118. border-radius: 50%;
  119. margin-right: 6rpx;
  120. }
  121. }
  122. .like {
  123. display: flex;
  124. align-items: center;
  125. }
  126. }
  127. }
  128. .showVideo{
  129. display: flex;
  130. justify-content: center;
  131. align-items: center;
  132. height: 100%;
  133. width: 1000%;
  134. video{
  135. // width: 100%;
  136. // height: 100%;
  137. }
  138. }
  139. }
  140. </style>