search.vue 4.3 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209
  1. <template>
  2. <view class="search-scenic">
  3. <view class="search-box">
  4. <view class="city-box">
  5. <image class="icon" src="@/static/blue-position.png" mode=""></image>
  6. <view class="city">
  7. {{city}}
  8. </view>
  9. </view>
  10. <input class="search" v-model="value" type="text" placeholder="景点名称" />
  11. </view>
  12. <zs-list class="list" mt="0" @load="loadMore" :status="status">
  13. <view class="item" @click="goDetail">
  14. <zs-img src="http://zswl-dev.oss-cn-chengdu.aliyuncs.com/63b7c68b71a69169d1b33f92/store/65fe7c9174d67a7dbd842b74/ext/GOODS_INFO/微信图片_20240328145646.png/1.png" width="200rpx" height="200rpx" radius="full" mode=""></zs-img>
  15. <view class="info">
  16. <view class="title">
  17. 重庆杜莎夫人蜡像馆重庆杜莎夫人蜡像馆1
  18. </view>
  19. <view class="price-box">
  20. <view class="unit">
  21. </view>
  22. <view class="price">
  23. 580
  24. </view>
  25. <view class="text">
  26. </view>
  27. </view>
  28. <view class="address-box">
  29. <view class="address">
  30. 重庆
  31. </view>
  32. <view class="distance">
  33. 138.8km
  34. </view>
  35. </view>
  36. </view>
  37. </view>
  38. <view class="item">
  39. <zs-img src="http://zswl-dev.oss-cn-chengdu.aliyuncs.com/63b7c68b71a69169d1b33f92/store/65fe7c9174d67a7dbd842b74/ext/GOODS_INFO/微信图片_20240328145646.png/1.png" width="200rpx" height="200rpx" mode=""></zs-img>
  40. <view class="info">
  41. <view class="title">
  42. 重庆杜莎夫人蜡像馆
  43. </view>
  44. <view class="price-box">
  45. <view class="unit">
  46. </view>
  47. <view class="price">
  48. 580
  49. </view>
  50. <view class="text">
  51. </view>
  52. </view>
  53. <view class="address-box">
  54. <view class="address">
  55. 重庆
  56. </view>
  57. <view class="distance">
  58. 138.8km
  59. </view>
  60. </view>
  61. </view>
  62. </view>
  63. </zs-list>
  64. </view>
  65. </template>
  66. <script>
  67. import {debounce} from '@/utils/tool.js'
  68. export default {
  69. data() {
  70. return {
  71. city: uni.getStorageSync('city'),
  72. value:''
  73. }
  74. },
  75. watch: {
  76. value:debounce(function(value) {
  77. console.log(111111);
  78. })
  79. },
  80. methods: {
  81. loadMore(){
  82. },
  83. goDetail(){
  84. uni.navigateTo({
  85. url:'/scenic/detail'
  86. })
  87. }
  88. },
  89. onLoad() {
  90. uni.setNavigationBarTitle({
  91. title: uni.getStorageSync('city')
  92. });
  93. }
  94. }
  95. </script>
  96. <style lang="scss" >
  97. .search-scenic{
  98. min-height: 100vh;
  99. padding: 112rpx 24rpx 0;
  100. .search-box{
  101. position: fixed;
  102. top: 20rpx;
  103. left: 24rpx;
  104. width: 702rpx;
  105. height: 72rpx;
  106. // padding: 16rpx;
  107. box-sizing: border-box;
  108. z-index: 9;
  109. background: #F6F6F6;
  110. border-radius: 40rpx 40rpx 40rpx 40rpx;
  111. .city-box{
  112. position: absolute;
  113. left: 0;
  114. top: 50%;
  115. transform: translateY(-50%);
  116. display: flex;
  117. align-items: center;
  118. padding: 0 28rpx;
  119. border-right: 1rpx solid #F0F0F0;
  120. .icon{
  121. width: 30rpx;
  122. height: 30rpx;
  123. }
  124. .city{
  125. font-weight: 600;
  126. font-size: 28rpx;
  127. color: #222222;
  128. margin-left: 6rpx;
  129. }
  130. }
  131. .search{
  132. width: 702rpx;
  133. height: 72rpx;
  134. border-radius: 40rpx 40rpx 40rpx 40rpx;
  135. padding-left: 230rpx;
  136. padding-right: 100rpx;
  137. box-sizing: border-box;
  138. }
  139. }
  140. .zs-list{
  141. .item{
  142. background: #FFFFFF;
  143. border-radius: 16rpx;
  144. display: flex;
  145. padding: 12rpx 0;
  146. border-bottom: 1rpx solid #F0F0F0;
  147. .zs-img{
  148. width: 200rpx;
  149. }
  150. .info{
  151. flex: 1;
  152. padding: 30rpx 20rpx 20rpx;
  153. box-sizing: border-box;
  154. display: flex;
  155. flex-direction: column;
  156. justify-content: space-between;
  157. .title{
  158. font-weight: 400;
  159. font-size: 24rpx;
  160. color: #222222;
  161. width: 450rpx;
  162. white-space: nowrap;
  163. overflow: hidden;
  164. text-overflow: ellipsis;
  165. }
  166. .price-box{
  167. display: flex;
  168. align-items: flex-end;
  169. margin-top: 12rpx;
  170. .unit{
  171. font-weight: 600;
  172. font-size: 20rpx;
  173. color: $uni-color-primary;
  174. }
  175. .price{
  176. font-weight: 600;
  177. font-size: 36rpx;
  178. color: $uni-color-primary;
  179. }
  180. .text{
  181. font-weight: 300;
  182. font-size: 24rpx;
  183. color: #AAAAAA;
  184. margin-left: 6rpx;
  185. }
  186. }
  187. .address-box{
  188. display: flex;
  189. align-items: center;
  190. justify-content: space-between;
  191. font-weight: 300;
  192. font-size: 20rpx;
  193. color: #AAAAAA;
  194. margin-top: 12rpx;
  195. }
  196. }
  197. }
  198. }
  199. }
  200. </style>