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

252 lines
5.1 KiB

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