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

70 lines
1.6 KiB

1 month ago
2 weeks ago
1 month ago
3 weeks ago
1 month ago
  1. <template>
  2. <view>
  3. <view class="info cardStyle_"
  4. v-for="(item, index) in cardListData"
  5. :key="index" @click="toDetail(item)">
  6. <view class="left">
  7. <image :src="item.image && item.image.split(',')[0]" mode="aspectFill">
  8. </view>
  9. <view class="right">
  10. <view class="detailed">
  11. <view class="title">{{item.title}}</view>
  12. <view class="date">{{ $dayjs(item.startTime).format('YYYY-MM-DD') }}</view>
  13. <view class="address">{{item.address}}</view>
  14. </view>
  15. <view class="data">
  16. <text>¥{{item.price}}</text>
  17. <text>{{item.num}}/{{item.sum}}</text>
  18. <text class="btn" v-if="item.state == 0">报名中</text>
  19. <text class="btn-2" v-if="item.state == 1">已结束</text>
  20. </view>
  21. </view>
  22. </view>
  23. </view>
  24. </template>
  25. <script>
  26. export default {
  27. name:"travelList",
  28. props : ['cardListData'],
  29. data() {
  30. return {
  31. };
  32. },
  33. methods : {
  34. toDetail({ id }) {
  35. uni.navigateTo({
  36. url:`/pages_order/lvyou-detail?travelId=${id}`
  37. })
  38. },
  39. }
  40. }
  41. </script>
  42. <style scoped lang="scss">
  43. .info {
  44. position: relative;
  45. margin: 20rpx 0;
  46. padding: 35rpx 0 35rpx 24rpx;
  47. border-radius: 26rpx;
  48. .right {
  49. .data {
  50. display: flex;
  51. justify-content: space-between;
  52. align-items: center;
  53. .btn {
  54. background: #381615;
  55. color: $uni-color-primary;
  56. padding: 10rpx 40rpx;
  57. border-radius: 30rpx 0px 0px 30rpx;
  58. }
  59. .btn-2 {
  60. background: #333;
  61. color: #999;
  62. padding: 10rpx 40rpx;
  63. border-radius: 30rpx 0px 0px 30rpx;
  64. }
  65. }
  66. }
  67. }
  68. </style>