index.vue 1.6 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869
  1. <template>
  2. <div class="live-list-page" v-if="roomList && roomList.length > 0">
  3. <div class="title">
  4. <!-- #ifdef MP-WEIXIN -->
  5. <img class="title-img" src="../../../static/images/live/img-title.png" alt="直播" mode="widthFix"/>
  6. <!-- #endif -->
  7. <!-- #ifdef H5 || APP-PLUS -->
  8. <image class="title-img" src="../../../static/images/live/img-title.png" alt="直播" mode="widthFix"/>
  9. <!-- #endif -->
  10. </div>
  11. <div class="live-list">
  12. <LiveBox class="live-item"
  13. v-for="item in roomList"
  14. :key="item.roomid"
  15. :liveData.sync="item"
  16. @click="toLiveRoom(item)"
  17. />
  18. </div>
  19. <button v-show="componentContent.showMore" class="btn-more" @click="jumpLive()">查看全部 <span class="icon iconfont icon-arrow-right"></span></button>
  20. </div>
  21. </template>
  22. <script>
  23. import {commonMixin} from '../mixin'
  24. import LiveBox from './item.vue'
  25. export default {
  26. mixins: [commonMixin],
  27. components: {
  28. LiveBox
  29. },
  30. }
  31. </script>
  32. <style lang="scss" scoped>
  33. .live-list-page{
  34. .title{
  35. text-align: center;
  36. margin-bottom: 20rpx;
  37. .title-img{
  38. width: 211rpx;
  39. height: 32rpx;
  40. }
  41. }
  42. .live-list{
  43. padding-left: 20rpx;
  44. width: 100%;
  45. display: flex;
  46. flex-wrap: wrap;
  47. .live-item{
  48. margin:0 14rpx 14rpx 0;
  49. width: 348rpx;
  50. height: 464rpx;
  51. border-radius: 8rpx;
  52. overflow: hidden;
  53. }
  54. }
  55. .btn-more {
  56. width: 170rpx;
  57. height: 54rpx;
  58. border: 2rpx solid #C5AA7B;
  59. color: #C5AA7B;
  60. font-size: 24rpx;
  61. background-color: transparent;
  62. margin: 20rpx auto 0;
  63. display: flex;
  64. align-items: center;
  65. }
  66. }
  67. </style>