newBox.vue 2.8 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141
  1. <template>
  2. <view class="new_box">
  3. <view class="card_item" v-for="(item, index) in card" :key="index">
  4. <view class="item_top">
  5. <view class="item_img">
  6. <view class="item_square">
  7. <image
  8. :src="`../../static/home/new_${index}.png`"
  9. class="img"
  10. ></image>
  11. </view>
  12. </view>
  13. <view class="line"></view>
  14. </view>
  15. <view class="item_text">
  16. <view class="item_num">{{ index + 1 }}</view>
  17. <trans class="text" :_t="item.text" />
  18. </view>
  19. </view>
  20. <view class="middle">
  21. <view class="truck">
  22. <image src="/static/home/truck.png" class="img"></image>
  23. </view>
  24. <view class="arrow">
  25. <image src="/static/home/arrow.png" class="img"></image>
  26. </view>
  27. </view>
  28. </view>
  29. </template>
  30. <script setup>
  31. const card = [
  32. {
  33. icon: "",
  34. text: "来自卖家",
  35. },
  36. {
  37. icon: "",
  38. text: "送货上门",
  39. },
  40. ];
  41. </script>
  42. <style lang="less" scoped>
  43. @import url("@/style.less");
  44. .new_box {
  45. display: flex;
  46. justify-content: space-between;
  47. position: relative;
  48. .card_item {
  49. // min-width: 33%;
  50. color: var(--text);
  51. font-size: 24rpx;
  52. font-weight: bold;
  53. .flex_center();
  54. flex-direction: column;
  55. position: relative;
  56. z-index: 1;
  57. .item_top {
  58. position: relative;
  59. border-radius: 50%;
  60. padding: 14rpx;
  61. background-color: var(--bg);
  62. box-sizing: border-box;
  63. .item_img {
  64. background-color: var(--bg);
  65. border-radius: 50%;
  66. .flex_center();
  67. padding: 14rpx;
  68. border: 2rpx dashed var(--bor-color1);
  69. .item_square {
  70. width: 50rpx;
  71. height: 50rpx;
  72. .flex_center();
  73. background-color: #186de1;
  74. border-radius: 12rpx;
  75. .img {
  76. width: 38rpx;
  77. height: 33rpx;
  78. }
  79. }
  80. }
  81. }
  82. .item_text {
  83. display: flex;
  84. align-items: center;
  85. margin-top: 10rpx;
  86. .item_num {
  87. width: 32rpx;
  88. height: 32rpx;
  89. border-radius: 50%;
  90. background-color: #186de1;
  91. display: flex;
  92. justify-content: center;
  93. font-size: 24rpx;
  94. color: var(--light);
  95. line-height: 32rpx;
  96. margin-right: 8rpx;
  97. }
  98. .text {
  99. flex: 1;
  100. display: inline-block;
  101. text-align: center;
  102. white-space: nowrap;
  103. }
  104. }
  105. }
  106. .middle {
  107. position: absolute;
  108. top: 16rpx;
  109. left: 51%;
  110. transform: translateX(-50%);
  111. display: flex;
  112. align-items: center;
  113. flex-direction: column;
  114. .truck {
  115. width: 48rpx;
  116. height: 48rpx;
  117. .img {
  118. width: 100%;
  119. height: 100%;
  120. }
  121. }
  122. .arrow {
  123. width: 232rpx;
  124. height: 18rpx;
  125. .img {
  126. width: 100%;
  127. height: 100%;
  128. }
  129. }
  130. }
  131. }
  132. </style>