推广小程序前端代码
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.

217 lines
4.4 KiB

5 months ago
  1. <template>
  2. <view class="cardList">
  3. <view class="container" v-for="item in 2" :key="item">
  4. <view class="content">
  5. <view class="left">
  6. <image src="@/static/image/member/item-img.png" mode="widthFix"></image>
  7. </view>
  8. <view class="right">
  9. <view class="detailed">
  10. <view class="title">周五桌游野餐雅致...</view>
  11. <view class="date">2024.10.28 10:00</view>
  12. <view class="address">成都市东丽湖露营地32号</view>
  13. </view>
  14. <view class="tips-box">
  15. <view class="tips-box-item">高质量</view>
  16. <view class="tips-box-item">多平台招募</view>
  17. <view class="tips-box-item">交友</view>
  18. </view>
  19. </view>
  20. </view>
  21. <view class="bottom-box">
  22. <view class="bottom-box-l">
  23. <uv-avatar-group :urls="urls" size="45rpx" gap="0.1"></uv-avatar-group>
  24. <view class="num">4人参加</view>
  25. </view>
  26. <view class="bottom-box-r">
  27. 参与招募
  28. </view>
  29. </view>
  30. <view class="tabs-box" :class="item == 1? 'bzcx-item' : 'ycx-item'">{{item == 1? '保证成行' : '已成行'}}</view>
  31. </view>
  32. </view>
  33. </template>
  34. <script>
  35. export default {
  36. props: {
  37. cardListData: {
  38. type: Array,
  39. default: []
  40. },
  41. },
  42. data() {
  43. return {
  44. urls: [
  45. 'https://cdn.uviewui.com/uview/album/1.jpg',
  46. 'https://cdn.uviewui.com/uview/album/2.jpg',
  47. 'https://cdn.uviewui.com/uview/album/3.jpg',
  48. ]
  49. };
  50. },
  51. components: {
  52. },
  53. computed: {},
  54. watch: {
  55. },
  56. created() {
  57. },
  58. mounted() {},
  59. methods: {
  60. skip(val) {
  61. uni.navigateTo({
  62. url: '/pages_order/orderDetails'
  63. })
  64. }
  65. }
  66. };
  67. </script>
  68. <style scoped lang="scss">
  69. .cardList {
  70. .container {
  71. margin-bottom: 30rpx;
  72. border-radius: 20rpx;
  73. background: #1B1713;
  74. position: relative;
  75. .content {
  76. display: flex;
  77. padding: 24rpx 35rpx;
  78. border-bottom: 1px solid #2A2A2A;
  79. .left {
  80. border-radius: 20rpx;
  81. overflow: hidden;
  82. image {
  83. width: 228rpx;
  84. }
  85. }
  86. .right {
  87. display: flex;
  88. flex-direction: column;
  89. justify-content: space-between;
  90. flex: 1;
  91. margin-left: 23rpx;
  92. color: $uni-text-color-grey;
  93. font-size: 24rpx;
  94. .detailed {
  95. .title {
  96. font-size: 32rpx;
  97. color: #fff;
  98. padding-top: 11rpx;
  99. }
  100. .date {
  101. padding: 25rpx 0 19rpx;
  102. display: flex;
  103. align-items: center;
  104. &::before {
  105. content: '';
  106. display: block;
  107. background: url('@/static/image/cart/timeIcon.png') no-repeat;
  108. background-size: 100% 100%;
  109. width: 24rpx;
  110. height: 24rpx;
  111. margin-right: 10rpx;
  112. }
  113. }
  114. .address {
  115. display: flex;
  116. align-items: center;
  117. &::before {
  118. content: '';
  119. display: block;
  120. background: url('@/static/image/cart/addressIcon.png') no-repeat;
  121. background-size: 100% 100%;
  122. width: 22rpx;
  123. height: 26rpx;
  124. margin-right: 10rpx;
  125. }
  126. }
  127. }
  128. .tips-box {
  129. display: flex;
  130. align-items: center;
  131. .tips-box-item {
  132. padding: 0 24rpx;
  133. height: 38rpx;
  134. line-height: 38rpx;
  135. background: #282421;
  136. border-radius: 7rpx;
  137. font-size: 20rpx;
  138. color: #999999;
  139. margin-right: 14rpx;
  140. &:last-child {
  141. margin-right: 0;
  142. }
  143. }
  144. }
  145. }
  146. }
  147. .bottom-box {
  148. display: flex;
  149. align-items: center;
  150. justify-content: space-between;
  151. height: 104rpx;
  152. padding: 0 21rpx;
  153. &-l {
  154. display: flex;
  155. align-items: center;
  156. .num {
  157. font-weight: 500;
  158. font-size: 25rpx;
  159. color: #999999;
  160. margin-left: 20rpx;
  161. }
  162. }
  163. &-r {
  164. width: 180rpx;
  165. height: 53rpx;
  166. background: url('@/static/image/member/canyu-bg.png') no-repeat;
  167. background-size: 100% 100%;
  168. font-weight: 500;
  169. font-size: 23rpx;
  170. color: #FFFFFF;
  171. text-align: center;
  172. line-height: 53rpx;
  173. }
  174. }
  175. .tabs-box {
  176. position: absolute;
  177. top: 0;
  178. right: 0;
  179. width: 117rpx;
  180. height: 40rpx;
  181. font-weight: 500;
  182. font-size: 21rpx;
  183. text-align: center;
  184. line-height: 40rpx;
  185. }
  186. .bzcx-item {
  187. background: url('@/static/image/member/bzcx-bg.png') no-repeat;
  188. background-size: 100% 100%;
  189. color: #FF9000;
  190. }
  191. .ycx-item {
  192. background: url('@/static/image/member/ycx-bg.png') no-repeat;
  193. background-size: 100% 100%;
  194. color: #FF3B47;
  195. }
  196. }
  197. }
  198. </style>