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

150 lines
2.7 KiB

8 months ago
8 months ago
8 months ago
8 months ago
8 months ago
8 months ago
8 months ago
8 months ago
8 months ago
8 months ago
8 months ago
8 months ago
8 months ago
8 months ago
8 months ago
8 months ago
8 months ago
8 months ago
8 months ago
8 months ago
8 months ago
8 months ago
8 months ago
8 months ago
8 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. this.$api('queryVedioById', this.queryParams, res => {
  61. if(res.code == 200){
  62. this.list = res.result.records
  63. this.total = res.result.total
  64. }
  65. })
  66. },
  67. loadMoreData(){
  68. if(this.queryParams.pageSize < this.total){
  69. this.queryParams.pageSize += 10
  70. this.queryVideoList()
  71. }
  72. },
  73. }
  74. }
  75. </script>
  76. <style scoped lang="scss">
  77. .videoList {
  78. display: flex;
  79. flex-wrap: wrap;
  80. .video-item {
  81. margin: 20rpx;
  82. width: 335rpx;
  83. .image {
  84. position: relative;
  85. width: 100%;
  86. height: 420rpx;
  87. border-radius: 30rpx;
  88. overflow: hidden;
  89. image {
  90. width: 100%;
  91. height: 100%;
  92. }
  93. .icon {
  94. position: absolute;
  95. right: 30rpx;
  96. top: 30rpx;
  97. width: 60rpx;
  98. height: 60rpx;
  99. background-color: #ffffffaa;
  100. border-radius: 50%;
  101. display: flex;
  102. justify-content: center;
  103. align-items: center;
  104. }
  105. }
  106. .bottom {
  107. padding: 10rpx 0;
  108. font-size: 22rpx;
  109. display: flex;
  110. justify-content: space-between;
  111. .headImage {
  112. display: flex;
  113. align-items: center;
  114. image {
  115. width: 50rpx;
  116. height: 50rpx;
  117. border-radius: 50%;
  118. margin-right: 6rpx;
  119. }
  120. }
  121. .like {
  122. display: flex;
  123. align-items: center;
  124. }
  125. }
  126. }
  127. .showVideo{
  128. display: flex;
  129. justify-content: center;
  130. align-items: center;
  131. height: 100%;
  132. width: 1000%;
  133. video{
  134. // width: 100%;
  135. // height: 100%;
  136. }
  137. }
  138. }
  139. </style>