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

235 lines
4.8 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
1 month 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 month 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.title}}</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" keyName="headImage" size="45rpx" gap="0.1"></uv-avatar-group>
  27. <view class="num">{{item.num}}人参加</view>
  28. </view>
  29. <view class="bottom-box-r" @click="toZhaomu(item)">
  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. this.urls = val.popularizeRecruitLogList;
  62. },
  63. immediate:true
  64. }
  65. },
  66. mounted() {
  67. },
  68. methods: {
  69. skip(val) {
  70. uni.navigateTo({
  71. url: '/pages_order/orderDetails'
  72. })
  73. },
  74. toZhaomu(item) {
  75. let params = {
  76. recruitId:item.id,
  77. }
  78. this.$api('shopUserAuth',params,res=>{
  79. if(res.code == 200) {
  80. this.$Toast('参与成功')
  81. }
  82. })
  83. }
  84. }
  85. };
  86. </script>
  87. <style scoped lang="scss">
  88. .cardList {
  89. .container {
  90. margin-bottom: 30rpx;
  91. border-radius: 20rpx;
  92. background: #1B1713;
  93. position: relative;
  94. .content {
  95. display: flex;
  96. padding: 24rpx 35rpx;
  97. border-bottom: 1px solid #2A2A2A;
  98. .left {
  99. image {
  100. width: 228rpx;
  101. height: 228rpx;
  102. border-radius: 20rpx;
  103. }
  104. }
  105. .right {
  106. display: flex;
  107. flex-direction: column;
  108. justify-content: space-between;
  109. flex: 1;
  110. margin-left: 23rpx;
  111. color: $uni-text-color-grey;
  112. font-size: 24rpx;
  113. .detailed {
  114. .title {
  115. font-size: 32rpx;
  116. color: #fff;
  117. padding-top: 11rpx;
  118. }
  119. .date {
  120. padding: 25rpx 0 19rpx;
  121. display: flex;
  122. align-items: center;
  123. &::before {
  124. content: '';
  125. display: block;
  126. background: url('@/static/image/cart/timeIcon.png') no-repeat;
  127. background-size: 100% 100%;
  128. width: 24rpx;
  129. height: 24rpx;
  130. margin-right: 10rpx;
  131. }
  132. }
  133. .address {
  134. display: flex;
  135. margin-bottom: 10rpx;
  136. .img-box {
  137. width: 22rpx;
  138. height: 26rpx;
  139. margin-right: 10rpx;
  140. flex-shrink: 0;
  141. image {
  142. width: 100%;
  143. height: 100%;
  144. }
  145. }
  146. }
  147. }
  148. .tips-box {
  149. display: flex;
  150. align-items: center;
  151. flex-wrap: wrap;
  152. .tips-box-item {
  153. padding: 0 24rpx;
  154. height: 38rpx;
  155. line-height: 38rpx;
  156. background: #282421;
  157. border-radius: 7rpx;
  158. font-size: 20rpx;
  159. color: #999999;
  160. margin-right: 14rpx;
  161. margin-bottom: 5px;
  162. &:last-child {
  163. margin-right: 0;
  164. }
  165. }
  166. }
  167. }
  168. }
  169. .bottom-box {
  170. display: flex;
  171. align-items: center;
  172. justify-content: space-between;
  173. height: 104rpx;
  174. padding: 0 21rpx;
  175. &-l {
  176. display: flex;
  177. align-items: center;
  178. .num {
  179. font-weight: 500;
  180. font-size: 25rpx;
  181. color: #999999;
  182. margin-left: 20rpx;
  183. }
  184. }
  185. &-r {
  186. width: 180rpx;
  187. height: 53rpx;
  188. background: url('@/static/image/member/canyu-bg.png') no-repeat;
  189. background-size: 100% 100%;
  190. font-weight: 500;
  191. font-size: 23rpx;
  192. color: #FFFFFF;
  193. text-align: center;
  194. line-height: 53rpx;
  195. }
  196. }
  197. .tabs-box {
  198. position: absolute;
  199. top: 0;
  200. right: 0;
  201. width: 117rpx;
  202. height: 40rpx;
  203. font-weight: 500;
  204. font-size: 21rpx;
  205. text-align: center;
  206. line-height: 40rpx;
  207. }
  208. .bzcx-item {
  209. background: url('@/static/image/member/bzcx-bg.png') no-repeat;
  210. background-size: 100% 100%;
  211. color: #FF9000;
  212. }
  213. .ycx-item {
  214. background: url('@/static/image/member/ycx-bg.png') no-repeat;
  215. background-size: 100% 100%;
  216. color: #FF3B47;
  217. }
  218. }
  219. }
  220. </style>