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

142 lines
2.6 KiB

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