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

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