listItem.vue 3.2 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150
  1. <template>
  2. <view class="lis-item x-f es-center es-pt-24 es-pb-30 es-pl-30 es-pr-30 lis-item-line">
  3. <view class="avatar live es-w-112 es-h-112">
  4. <view class="live-status x-c">直播中</view>
  5. <image
  6. src="https://fs-1319721001.cos.ap-chongqing.myqcloud.com/fs/20240229/1d7eb0607a074892964dd32e8735e540.jpg"
  7. mode="aspectFill"></image>
  8. </view>
  9. <view class="x-f es-center flex">
  10. <view class="es-ml-16">
  11. <view class="title es-mb-20">徐丽医生</view>
  12. <view class="desc" v-show="type=='follow'">直播免费接诊</view>
  13. <view class="desc" v-show="type=='fans'">17粉丝 1视频</view>
  14. </view>
  15. <view class="x-c desc" :class="isFollow?'follow':'no-follow'">{{isFollow? '已关注' : type=='follow'?'关注': '回关'}}</view>
  16. </view>
  17. </view>
  18. <!-- <view class="lis-item x-f es-center es-pt-24 es-pb-30 es-pl-30 es-pr-30 lis-item-line">
  19. <view class="avatar es-w-112 es-h-112">
  20. <view class="live-status x-c">直播中</view>
  21. <image
  22. src="https://fs-1319721001.cos.ap-chongqing.myqcloud.com/fs/20240229/1d7eb0607a074892964dd32e8735e540.jpg"
  23. mode="aspectFill"></image>
  24. </view>
  25. <view class="x-f es-center flex">
  26. <view class="es-ml-16">
  27. <view class="title es-mb-20">徐丽医生</view>
  28. <view class="desc">直播免费接诊</view>
  29. <view class="desc">17粉丝 1视频</view>
  30. </view>
  31. <view class="no-follow x-c desc">关注</view>
  32. </view>
  33. </view> -->
  34. </template>
  35. <script>
  36. export default {
  37. props: {
  38. type: {
  39. type: String,
  40. default: 'follow'
  41. },
  42. isFollow: {
  43. type: Boolean,
  44. default: false
  45. },
  46. },
  47. data() {
  48. return {
  49. }
  50. }
  51. }
  52. </script>
  53. <style scoped lang="scss">
  54. .title {
  55. font-weight: 600;
  56. }
  57. .desc {
  58. font-size: 24rpx;
  59. color: #999999;
  60. }
  61. .avatar {
  62. border-radius: 50%;
  63. position: relative;
  64. box-sizing: border-box;
  65. border: 5rpx solid #FF5C03;
  66. image {
  67. border-radius: 50%;
  68. width: 100%;
  69. height: 100%;
  70. position: relative;
  71. z-index: 3;
  72. }
  73. }
  74. .live {
  75. padding: 6rpx;
  76. border: none;
  77. background: linear-gradient(to bottom, #FACC22, #FF5C03);
  78. &::after {
  79. position: absolute;
  80. left: 50%;
  81. top: 50%;
  82. transform: translate(-50%, -50%);
  83. content: "";
  84. width: 106rpx;
  85. height: 106rpx;
  86. background-color: #fff;
  87. border-radius: 50%;
  88. }
  89. }
  90. .live-status {
  91. min-width: 96rpx;
  92. padding: 5rpx 0;
  93. box-sizing: border-box;
  94. background: #FF5C03;
  95. border-radius: 17rpx;
  96. position: absolute;
  97. left: 50%;
  98. bottom: -14rpx;
  99. transform: translateX(-50%);
  100. z-index: 9;
  101. font-family: MiSans;
  102. font-weight: 400;
  103. font-size: 20rpx;
  104. color: #FFFFFF;
  105. word-break: keep-all;
  106. }
  107. .follow {
  108. width: 150rpx;
  109. height: 51rpx;
  110. background: #E5E5E5;
  111. border-radius: 25rpx;
  112. }
  113. .no-follow {
  114. width: 150rpx;
  115. height: 51rpx;
  116. background: #FFFFFF;
  117. border-radius: 25rpx;
  118. border: 1px solid #FF5C03;
  119. color: #FF5C03 !important;
  120. }
  121. .lis-item {
  122. overflow: hidden;
  123. }
  124. .lis-item-line {
  125. position: relative;
  126. &::after {
  127. content: "";
  128. position: absolute;
  129. bottom: 0;
  130. left: 136rpx;
  131. border-bottom: 1px solid #F5F7FA;
  132. width: 100%;
  133. transform: scaleY(0.5);
  134. border-top-color: #F5F7FA;
  135. border-right-color: #F5F7FA;
  136. border-left-color: #F5F7FA;
  137. }
  138. }
  139. </style>