index.vue 3.7 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188
  1. <template>
  2. <view class="container">
  3. <!-- 搜索框区域 -->
  4. <uv-row custom-style="margin: 10px 0px" gutter="10">
  5. <uv-col span="12">
  6. <view class="search">
  7. <view class="add">
  8. <image class="img" src="../../static/index/add.png" mode="aspectFit"></image>
  9. </view>
  10. <input class="inp" type="text" v-model="keywords" placeholder="请输入关键字搜索" />
  11. <view class="btnSearch" @click="searchHandler()">搜索</view>
  12. </view>
  13. </uv-col>
  14. </uv-row>
  15. <!-- 名宿列表区域 -->
  16. <uv-row justify="space-between" gutter="10">
  17. <uv-col span="6">
  18. <view class="item">
  19. <image class="item-img" src="../../static/search/img.png" mode="scaleToFill"></image>
  20. <view class="descrition">
  21. <text class="title">双溪镇抱朴小院</text>
  22. <view class="detail">
  23. <view class="price">
  24. <text class="txt1">¥180</text>
  25. <text class="txt2">起</text>
  26. </view>
  27. <text class="score">5.0分</text>
  28. </view>
  29. </view>
  30. </view>
  31. </uv-col>
  32. <uv-col span="6">
  33. <view class="item">
  34. <image class="item-img" src="../../static/search/img.png" mode="scaleToFill"></image>
  35. <view class="descrition">
  36. <text class="title">双溪镇抱朴小院</text>
  37. <view class="detail">
  38. <view class="price">
  39. <text class="txt1">¥180</text>
  40. <text class="txt2">起</text>
  41. </view>
  42. <text class="score">5.0分</text>
  43. </view>
  44. </view>
  45. </view>
  46. </uv-col>
  47. </uv-row>
  48. <view class="main">
  49. <view class="content"></view>
  50. </view>
  51. </view>
  52. </template>
  53. <script>
  54. export default {
  55. data() {
  56. return {
  57. keywords: ''
  58. }
  59. },
  60. onLoad() {},
  61. methods: {
  62. searchHandler() {
  63. console.log(this.keywords)
  64. }
  65. }
  66. }
  67. </script>
  68. <style lang="scss" scoped>
  69. .container {
  70. display: flex;
  71. flex-direction: column;
  72. align-items: center;
  73. width: 750rpx;
  74. box-sizing: border-box;
  75. .search {
  76. display: flex;
  77. justify-content: space-between;
  78. align-items: center;
  79. width: 700rpx;
  80. height: 70rpx;
  81. opacity: 1;
  82. border-radius: 70px;
  83. border: 1px solid rgba(30, 125, 251, 1);
  84. .add {
  85. display: flex;
  86. justify-content: center;
  87. align-items: center;
  88. margin-left: 10rpx;
  89. width: 60rpx;
  90. font-size: 50rpx;
  91. height: 60rpx;
  92. line-height: 60rpx;
  93. color: rgba(30, 125, 251, 1);
  94. border-right: 1px solid #ddd;
  95. .img {
  96. width: 30rpx;
  97. height: 30rpx;
  98. }
  99. }
  100. .inp {
  101. height: 60rpx;
  102. line-height: 60rpx;
  103. flex-grow: 1;
  104. padding-left: 20rpx;
  105. }
  106. .btnSearch {
  107. width: 100rpx;
  108. text-align: center;
  109. margin-right: 10rpx;
  110. height: 60rpx;
  111. line-height: 60rpx;
  112. opacity: 1;
  113. font-size: 32rpx;
  114. font-weight: 400;
  115. height: 2rem;
  116. color: rgba(30, 125, 251, 1);
  117. }
  118. }
  119. .item {
  120. width: 340rpx;
  121. box-sizing: border-box;
  122. margin-bottom: 20rpx;
  123. .item-img {
  124. width: 100%;
  125. height: 350rpx;
  126. border-radius: 18rpx 18rpx 0 0;
  127. box-sizing: border-box;
  128. }
  129. .descrition {
  130. display: flex;
  131. flex-direction: column;
  132. width: 100%;
  133. border-radius: 0 0 18rpx 18rpx;
  134. box-sizing: border-box;
  135. background: rgba(255, 255, 255, 1);
  136. margin-top: -10rpx;
  137. .title {
  138. font-size: 28rpx;
  139. font-weight: 500;
  140. padding: 20rpx 20rpx 10rpx;
  141. color: rgba(0, 0, 0, 1);
  142. }
  143. .detail {
  144. display: flex;
  145. flex-direction: row;
  146. justify-content: space-between;
  147. padding: 0 20rpx 20rpx 20rpx;
  148. color: rgba(0, 0, 0, 1);
  149. .price {
  150. .txt1 {
  151. font-size: 36rpx;
  152. font-weight: 500;
  153. color: rgba(255, 87, 51, 1);
  154. }
  155. .txt2 {
  156. font-size: 24rpx;
  157. font-weight: 400;
  158. color: rgba(255, 87, 51, 1);
  159. }
  160. }
  161. .score {
  162. font-size: 24rpx;
  163. font-weight: 400;
  164. padding-top: 10rpx;
  165. color: rgba(166, 166, 166, 1);
  166. }
  167. }
  168. }
  169. }
  170. }
  171. </style>