index.vue 3.9 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154
  1. <template>
  2. <div class="housingResources">
  3. <van-tabs :active="active" @change="onChange">
  4. <van-tab title="房源查询" :name="0">
  5. <houseList ref="houseList" />
  6. </van-tab>
  7. <van-tab title="我的预定" :name="1">
  8. <myReservation ref="myReservation"/>
  9. </van-tab>
  10. </van-tabs>
  11. </div>
  12. </template>
  13. <script>
  14. import houseList from "./components/houseList.vue";
  15. import myReservation from "./components/myReservation.vue";
  16. export default {
  17. name: "index",
  18. components:{
  19. houseList,
  20. myReservation
  21. },
  22. onPullDownRefresh: function () {
  23. this.getData()
  24. },
  25. data(){
  26. return{
  27. active:0
  28. }
  29. },
  30. methods:{
  31. onChange(e){
  32. this.active = e.detail.name;
  33. },
  34. getData(){
  35. if(this.active === 1){
  36. this.$refs.myReservation.getData();
  37. }
  38. }
  39. }
  40. }
  41. </script>
  42. <style lang="scss">
  43. .housingResources{
  44. .van-checkbox-group{
  45. display: flex;
  46. flex-wrap: wrap;
  47. .van-checkbox{
  48. margin-right: 24rpx;
  49. }
  50. .van-checkbox__label {
  51. padding-left: 6rpx;
  52. font-size: 28rpx;
  53. color: rgba(102, 102, 102, 1);
  54. }
  55. .van-checkbox__icon{
  56. width: 30rpx;
  57. height: 30rpx;
  58. }
  59. .van-icon, .van-icon:before {
  60. font-size: 24rpx;
  61. }
  62. .van-checkbox__icon--checked {
  63. background: rgba(3, 101, 249, 1);
  64. }
  65. }
  66. }
  67. .myReservation{
  68. margin-top: 24rpx;
  69. display: flex;
  70. flex-direction: column;
  71. align-items: center;
  72. padding-bottom: 100rpx;
  73. .historyItem{
  74. width: 686rpx;
  75. padding: 24rpx 0;
  76. background: white;
  77. box-sizing: border-box;
  78. position: relative;
  79. border-radius: 16rpx;
  80. margin-bottom: 24rpx;
  81. .tags{
  82. width: 160rpx;
  83. height: 56rpx;
  84. position: absolute;
  85. top: 0;
  86. right: 0;
  87. display: flex;
  88. align-items: center;
  89. justify-content: center;
  90. font-size: 26rpx;
  91. background-size: 100%;
  92. box-sizing: border-box;
  93. }
  94. .dqrTag{
  95. background: url('https://www.idea-co-sf.com/gardenProduct/image/bj05.png') no-repeat;
  96. color: rgba(226, 81, 0, 1);
  97. }
  98. .yslTag{
  99. background: url('https://www.idea-co-sf.com/gardenProduct/image/bj06.png') no-repeat;
  100. color: rgba(3, 101, 249, 1);
  101. }
  102. .historyItemTitle{
  103. padding: 8rpx 32rpx;
  104. width: 480rpx;
  105. color: rgba(34, 34, 34, 1);
  106. font-size: 32rpx;
  107. line-height: 40rpx;
  108. font-weight: 500;
  109. }
  110. .historyItemInfo{
  111. color: rgba(102, 102, 102, 1);
  112. font-size: 28rpx;
  113. padding: 10rpx 32rpx;
  114. }
  115. .historyItemBottom{
  116. display: flex;
  117. justify-content: flex-end;
  118. align-items: center;
  119. padding: 28rpx 32rpx 0 32rpx;
  120. border-top: 1px solid rgba(232, 237, 245, 1);
  121. margin-top: 22rpx;
  122. .btn{
  123. display: flex;
  124. align-items: center;
  125. justify-content: center;
  126. font-size: 28rpx;
  127. width: 160rpx;
  128. height: 60rpx;
  129. border-radius: 32rpx;
  130. border: 2rpx solid rgba(255, 107, 24, 1);
  131. color:rgba(255, 107, 24, 1);
  132. &::after{
  133. border: none;
  134. }
  135. }
  136. .zcBtn{
  137. background: linear-gradient( 316deg, #84AAFF 0%, #0365F9 100%);
  138. color: white;
  139. border: none;
  140. margin-left: 32rpx;
  141. }
  142. .yslBtn{
  143. border: none;
  144. background: rgba(236, 239, 243, 1);
  145. color: rgba(136, 136, 136, 1);
  146. }
  147. }
  148. }
  149. }
  150. </style>