activity-list.vue 3.4 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135
  1. <template>
  2. <view class="bg-white margin padding-sm radius zaiui-activity">
  3. <view class="cu-list grid col-2">
  4. <view class="cu-item">
  5. <view class="text-black text-bold text-left margin-left-xs">附近的人</view>
  6. <view class="flex p-xs margin-tb mb-sm">
  7. <view class="flex-twice text-left">
  8. <button class="cu-btn bg-blue sm round margin-top margin-left-xs">
  9. <text class="cuIcon-locationfill"></text>
  10. <text class="text">开启定位</text>
  11. </button>
  12. </view>
  13. <view class="flex-sub">
  14. <view class="padding-right-sm">
  15. <image class="location-img" src="/static/images/home/sundry/9.png" mode="widthFix"></image>
  16. </view>
  17. </view>
  18. </view>
  19. </view>
  20. <view class="cu-item">
  21. <view class="grid col-2">
  22. <view class="padding-left-sm" v-for="(item,index) in list_data" :key="index" v-if="index < 2" @tap="listTap(item,index)">
  23. <view class="text-black text-bold text-left">{{item.title}}</view>
  24. <view class="text-orange text-sm text-left">{{item.text}}</view>
  25. <view class="margin-tb-sm">
  26. <image class="width-img" :src="item.img" mode="widthFix"></image>
  27. </view>
  28. </view>
  29. </view>
  30. </view>
  31. <view class="cu-item">
  32. <view class="grid col-2 padding-right-sm margin-top-sm">
  33. <view class="padding-lr-xs" v-for="(item,index) in list_data" :key="index" v-if="index >= 2 && index < 4" @tap="listTap(item,index)">
  34. <view class="text-black text-bold text-left ">{{item.title}}</view>
  35. <view class="margin-top-sm">
  36. <image class="width-img" :src="item.img" mode="widthFix"></image>
  37. </view>
  38. </view>
  39. </view>
  40. </view>
  41. <view class="cu-item">
  42. <view class="grid col-2 margin-top-sm">
  43. <view class="padding-left-sm" v-for="(item,index) in list_data" :key="index" v-if="index >= 4 && index < 6" @tap="listTap(item,index)">
  44. <view class="text-black text-bold text-left ">{{item.title}}</view>
  45. <view class="margin-top-sm">
  46. <image class="width-img" :src="item.img" mode="widthFix"></image>
  47. </view>
  48. </view>
  49. </view>
  50. </view>
  51. </view>
  52. </view>
  53. </template>
  54. <script>
  55. import _tool from '@/static/zaiui/util/tools.js';
  56. export default {
  57. name: 'activity-list',
  58. props: {
  59. list_data: {
  60. type: Array,
  61. default: () => {
  62. return []
  63. }
  64. }
  65. },
  66. methods: {
  67. listTap(data,index) {
  68. this.$emit('listTap', {
  69. data,
  70. index
  71. });
  72. }
  73. }
  74. }
  75. </script>
  76. <style lang="scss" scoped>
  77. .zaiui-activity {
  78. .cu-list.grid>.cu-item {
  79. padding: 0;
  80. .cu-btn {
  81. text{
  82. color: #FFFFFF;
  83. font-size: 26upx;
  84. margin: 0;
  85. width: auto;
  86. }
  87. .text {
  88. margin-left: 10upx;
  89. }
  90. }
  91. image {
  92. width: 100%;
  93. }
  94. &::after {
  95. top: 0;
  96. left: 0;
  97. width: 200%;
  98. height: 200%;
  99. content: " ";
  100. position: absolute;
  101. transform: scale(.5);
  102. transform-origin: 0 0;
  103. pointer-events: none;
  104. box-sizing: border-box;
  105. border-radius: inherit;
  106. }
  107. &:nth-of-type(1) {
  108. &::after {
  109. border-right: 2upx solid rgba(0, 0, 0, .1);
  110. border-bottom: 2upx solid rgba(0, 0, 0, .1);
  111. }
  112. }
  113. &:nth-of-type(2) {
  114. &::after {
  115. border-right: 0;
  116. border-bottom: 2upx solid rgba(0, 0, 0, .1);
  117. }
  118. }
  119. &:nth-of-type(3) {
  120. &::after {
  121. border-right: 2upx solid rgba(0, 0, 0, .1);
  122. border-bottom: 0;
  123. }
  124. }
  125. &:nth-of-type(4) {
  126. &::after {
  127. border-right: 0;
  128. border-bottom: 0;
  129. }
  130. }
  131. }
  132. }
  133. </style>