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

229 lines
4.6 KiB

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