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

185 lines
3.4 KiB

10 months ago
10 months ago
9 months ago
10 months ago
10 months ago
10 months ago
9 months ago
9 months ago
10 months ago
10 months ago
9 months ago
10 months ago
9 months ago
10 months ago
10 months ago
10 months ago
10 months ago
10 months ago
10 months ago
9 months ago
10 months ago
10 months ago
10 months ago
10 months ago
10 months ago
9 months ago
10 months ago
9 months ago
10 months ago
10 months ago
10 months ago
10 months ago
10 months ago
10 months ago
10 months ago
10 months ago
10 months ago
10 months ago
9 months ago
10 months ago
10 months ago
10 months ago
10 months ago
10 months ago
10 months ago
10 months ago
10 months ago
10 months ago
10 months ago
  1. <template>
  2. <view class="cardList">
  3. <view class="content" >
  4. <view class="left">
  5. <image :src="images[0]" mode="aspectFill">
  6. </view>
  7. <view class="right">
  8. <view class="detailed">
  9. <view class="title">{{item.title}}</view>
  10. <view class="date">{{item.createTime}}</view>
  11. <view class="address">{{item.address}}</view>
  12. </view>
  13. <view class="price" v-if="showBottom">
  14. <view class="num-box">{{ item.doNum }}/{{ item.num }}</view>
  15. <view class="btn-box" @click="qiandaoClick"
  16. >开始签到</view>
  17. <!-- <view class="btn-box jieshu-btn" v-else>已结束</view> -->
  18. </view>
  19. </view>
  20. </view>
  21. </view>
  22. </template>
  23. <script>
  24. export default {
  25. props: {
  26. item: {
  27. type: Object,
  28. default: {}
  29. },
  30. showBottom : {
  31. default : false,
  32. },
  33. },
  34. data() {
  35. return {
  36. };
  37. },
  38. components: {
  39. },
  40. computed: {
  41. images(){
  42. return this.item.image ? this.item
  43. .image.split(','): []
  44. },
  45. },
  46. watch: {
  47. },
  48. created() {
  49. },
  50. mounted() {},
  51. methods: {
  52. qiandaoClick() {
  53. this.$emit('qiandaoClick')
  54. }
  55. }
  56. };
  57. </script>
  58. <style scoped lang="scss">
  59. .cardList {
  60. .content {
  61. display: flex;
  62. padding: 24rpx 35rpx;
  63. background: #1B1713;
  64. border-radius: 20rpx;
  65. margin-bottom: 20rpx;
  66. .left {
  67. width: 228rpx;
  68. height: 228rpx;
  69. border-radius: 20rpx;
  70. overflow: hidden;
  71. flex-shrink: 0;
  72. image {
  73. width: 100%;
  74. height: 100%;
  75. }
  76. }
  77. .right {
  78. display: flex;
  79. flex-direction: column;
  80. justify-content: space-between;
  81. flex: 1;
  82. margin-left: 26rpx;
  83. color: $uni-text-color-grey;
  84. font-size: 24rpx;
  85. width: 320rpx;
  86. .detailed {
  87. .title {
  88. font-size: 32rpx;
  89. color: #fff;
  90. padding-top: 11rpx;
  91. overflow:hidden; //超出的文本隐藏
  92. text-overflow:ellipsis; //溢出用省略号显示
  93. white-space:nowrap; //溢出不换行
  94. }
  95. .date {
  96. padding: 25rpx 0 19rpx;
  97. display: flex;
  98. align-items: center;
  99. &::before {
  100. content: '';
  101. display: block;
  102. background: url('@/static/image/cart/timeIcon.png') no-repeat;
  103. background-size: 100% 100%;
  104. width: 24rpx;
  105. height: 24rpx;
  106. margin-right: 10rpx;
  107. }
  108. }
  109. .address {
  110. display: flex;
  111. align-items: center;
  112. &::before {
  113. content: '';
  114. display: block;
  115. background: url('@/static/image/cart/addressIcon.png') no-repeat;
  116. background-size: 100% 100%;
  117. width: 22rpx;
  118. height: 26rpx;
  119. margin-right: 10rpx;
  120. }
  121. }
  122. }
  123. .price {
  124. display: flex;
  125. align-items: center;
  126. justify-content: space-between;
  127. margin-top: 10rpx;
  128. .num-box {
  129. font-size: 27rpx;
  130. color: #fff;
  131. }
  132. .btn-box {
  133. width: 180rpx;
  134. height: 54rpx;
  135. background: url('@/static/image/member/btn-2.png') no-repeat;
  136. background-size: 100% 100%;
  137. font-weight: 500;
  138. font-size: 23rpx;
  139. color: #FFFFFF;
  140. text-align: center;
  141. line-height: 54rpx;
  142. border-radius: 30rpx;
  143. }
  144. .jieshu-btn {
  145. background: #666666;
  146. }
  147. }
  148. }
  149. }
  150. .button-sp-area {
  151. text-align: right;
  152. padding-top: 20rpx;
  153. .mini-btn {
  154. width: 166rpx;
  155. height: 53rpx;
  156. line-height: 53rpx;
  157. font-size: 24rpx;
  158. border-radius: 50rpx;
  159. margin-left: 20rpx;
  160. background-color: #34312E;
  161. color: #AFAFAF;
  162. }
  163. }
  164. }
  165. .active {
  166. color: $uni-color-primary !important;
  167. }
  168. </style>