videoList.vue 1.6 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071727374757677787980818283848586
  1. <template>
  2. <view class="box">
  3. <view v-if="flag == 1" class="dffs boxlist">
  4. <view @click="nextTo(item)" class="vidLi" v-for="(item, ind) in list" :key="ind">
  5. <view class="imgbox">
  6. <image :src="item.img" mode=""></image>
  7. <view class="look">{{ item.see_num }}人观看</view>
  8. </view>
  9. <view class="title oneelli ">{{ item.title }}</view>
  10. </view>
  11. </view>
  12. </view>
  13. </template>
  14. <script>
  15. export default {
  16. data() {
  17. return {};
  18. },
  19. props: {
  20. list: {
  21. type: Array,
  22. default: []
  23. },
  24. flag: {
  25. type: [String, Number],
  26. default: 1
  27. }
  28. },
  29. methods: {
  30. nextTo(item) {
  31. uni.navigateTo({
  32. url: '/pages/index/video/videoInfo?id=' + item.id
  33. });
  34. }
  35. }
  36. };
  37. </script>
  38. <style scoped lang="scss">
  39. .boxlist {
  40. align-items: flex-start;
  41. width: auto;
  42. overflow-x: auto;
  43. &::-webkit-scrollbar {
  44. display: none;
  45. }
  46. .vidLi {
  47. background: #ffffff;
  48. box-shadow: 0px 0px 20rpx 0px rgba(0, 0, 0, 0.07);
  49. border-radius: 0px 0px 10rpx 10rpx;
  50. margin-right: 20rpx;
  51. width: 200rpx;
  52. .imgbox {
  53. width: 200rpx;
  54. height: 200rpx;
  55. position: relative;
  56. image {
  57. width: 200rpx;
  58. height: 200rpx;
  59. border-radius: 10rpx;
  60. }
  61. .look {
  62. position: absolute;
  63. bottom: 15rpx;
  64. left: 19rpx;
  65. background: rgba(#000, 0.3);
  66. border-radius: 18rpx;
  67. font-size: 20rpx;
  68. line-height: 28rpx;
  69. padding: 5rpx 14rpx;
  70. color: #ffffff;
  71. display: inline-block;
  72. }
  73. }
  74. .title {
  75. margin: 18rpx 12rpx;
  76. font-size: 28rpx;
  77. font-family: PingFangSC-Medium, PingFang SC;
  78. font-weight: 500;
  79. line-height: 40rpx;
  80. height: 40rpx;
  81. }
  82. }
  83. }
  84. </style>