venue.vue 2.2 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108
  1. <template>
  2. <view class="venue-card" v-for="(item,index) in listData" :key="index" @click="venuePreview(item)">
  3. <image :src="item.cover" mode=""></image>
  4. <view class="venue-info">
  5. <view class="info-title">
  6. <view class="title textHidden">{{item.name}}</view>
  7. <view class="sales">年售{{item.sales}}</view>
  8. </view>
  9. <view class="type">
  10. <text v-for="(category,index) in item.category" :key="index">{{category}}</text>
  11. </view>
  12. <view class="price-info">
  13. <view class="price">
  14. <view class="">¥{{item.sellingPrice}}</view>
  15. <view class="">¥{{item.originalPrice}}</view>
  16. </view>
  17. <view class="price-btn">免费预约</view>
  18. </view>
  19. </view>
  20. </view>
  21. </template>
  22. <script lang="ts" setup>
  23. interface Props {
  24. listData ?: any;
  25. }
  26. const props = withDefaults(defineProps<Props>(), {
  27. listData: []
  28. });
  29. const venuePreview = (item: any) => {
  30. uni.navigateTo({
  31. url: '/pages/index/submitOrder/index?id=' + item.id
  32. })
  33. }
  34. </script>
  35. <style lang="less" scoped>
  36. .venue-card{
  37. padding: 20rpx;
  38. background: #FFFFFF;
  39. border-radius: 32rpx;
  40. display: flex;
  41. align-items: center;
  42. gap: 20rpx;
  43. margin-top: 20rpx;
  44. &>image{
  45. width: 200rpx;
  46. height: 200rpx;
  47. border-radius: 32rpx;
  48. }
  49. .venue-info{
  50. width: 430rpx;
  51. .info-title{
  52. display: flex;
  53. align-items: center;
  54. justify-content: space-between;
  55. .title{
  56. width: 340rpx;
  57. font-weight: 800;
  58. font-size: 32rpx;
  59. color: #222222;
  60. }
  61. .sales{
  62. font-size: 22rpx;
  63. color: #AAAAAA;
  64. }
  65. }
  66. .type{
  67. margin-top: 16rpx;
  68. font-size: 24rpx;
  69. color: #AAAAAA;
  70. }
  71. .price-info{
  72. display: flex;
  73. align-items: center;
  74. justify-content: space-between;
  75. margin-top: 16rpx;
  76. .price{
  77. display: flex;
  78. align-items: center;
  79. gap: 20rpx;
  80. &>view:nth-child(1){
  81. font-weight: bold;
  82. font-size: 28rpx;
  83. color: #FB5B5B;
  84. }
  85. &>view:nth-child(2){
  86. font-size: 22rpx;
  87. color: #AAAAAA;
  88. text-decoration: line-through;
  89. }
  90. }
  91. .price-btn{
  92. width: 152rpx;
  93. height: 48rpx;
  94. background: #C8FF0C;
  95. border-radius: 8rpx;
  96. font-weight: bold;
  97. font-size: 28rpx;
  98. color: #222222;
  99. text-align: center;
  100. line-height: 48rpx;
  101. }
  102. }
  103. }
  104. }
  105. </style>