index.vue 7.8 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374
  1. <template>
  2. <view class="hotel">
  3. <zs-img class="banner" width="750rpx" height="556rpx" src="http://hyxhsh.oss-cn-chengdu.aliyuncs.com/63b7c68b71a69169d1b33f92/store/bdb/user/avatar/y82Lt1MyVdPu5f5f6895568756dbbea184cccce3825b.png/1.png"></zs-img>
  4. <view class="search-box">
  5. <view class="address-box">
  6. <view class="address">
  7. 重庆江北国际机场T3航站楼楼楼楼楼楼楼楼
  8. </view>
  9. <image class="more" src="../../static/right.png" mode=""></image>
  10. <view class="nearby">
  11. 附近酒店
  12. </view>
  13. <image class="position" src="../../static/rePosition.png" mode=""></image>
  14. </view>
  15. <view class="chooose-box">
  16. <view class="time-box">
  17. <view class="start-time">
  18. 03月07日
  19. </view>
  20. <view class="day">
  21. 周四
  22. </view>
  23. <view class="line">
  24. </view>
  25. <view class="end-time">
  26. 03月07日
  27. </view>
  28. <view class="day">
  29. 周五
  30. </view>
  31. </view>
  32. <view class="total">
  33. 共1晚
  34. <image class="more" src="@/static/right.png" mode=""></image>
  35. </view>
  36. </view>
  37. <view class="input-box">
  38. <input class="input" type="text" v-model="value" placeholder="搜索酒店名/地名/关键词" />
  39. <image class="more" src="@/static/right.png" mode=""></image>
  40. </view>
  41. <view class="btn-box">
  42. <button class="btn" type="default">特惠购票</button>
  43. </view>
  44. </view>
  45. <!-- 列表 -->
  46. <zs-list class="store-box" mt="0" @load="loadMore" :status="status">
  47. <view class="left">
  48. <view class="hotel-item" v-for="(item,index) in list" :key="index">
  49. <view >
  50. <zs-img src="http://zswl-dev.oss-cn-chengdu.aliyuncs.com/63b7c68b71a69169d1b33f92/store/662f340632e63427d1a36a50/ext/GOODS_INFO/750_750.jpg/1.jpg?x-oss-process=image/resize,w_376" width="340rpx" height="340rpx" mode="widthFix"></zs-img>
  51. <view class="info">
  52. <view class="price-box">
  53. <view class="left">
  54. <view class="price">
  55. ¥580
  56. </view>
  57. </view>
  58. <view class="right">
  59. 评分
  60. </view>
  61. </view>
  62. <view class="title">
  63. 重庆秘境森林里温汤的的绝
  64. 美民宿
  65. </view>
  66. <view class="desc">
  67. 观山湖区
  68. </view>
  69. </view>
  70. </view>
  71. </view>
  72. </view>
  73. <view class="right">
  74. <view class="hotel-item" v-for="(item,index) in list" :key="index">
  75. <view >
  76. <zs-img src="http://zswl-dev.oss-cn-chengdu.aliyuncs.com/63b7c68b71a69169d1b33f92/store/662f340632e63427d1a36a50/ext/GOODS_INFO/750_750.jpg/1.jpg?x-oss-process=image/resize,w_376" width="340rpx" height="340rpx" mode="widthFix"></zs-img>
  77. <view class="info">
  78. <view class="price-box">
  79. <view class="left">
  80. <view class="price">
  81. ¥580
  82. </view>
  83. </view>
  84. <view class="right">
  85. 评分
  86. </view>
  87. </view>
  88. <view class="title">
  89. 重庆秘境森林里温汤的的绝
  90. 美民宿
  91. </view>
  92. <view class="desc">
  93. 观山湖区
  94. </view>
  95. </view>
  96. </view>
  97. </view>
  98. </view>
  99. </zs-list>
  100. </view>
  101. </template>
  102. <script>
  103. export default {
  104. data() {
  105. return {
  106. value: '',
  107. list:9,
  108. list1:9,
  109. }
  110. },
  111. }
  112. </script>
  113. <style lang="scss" >
  114. .hotel{
  115. background: #F9F9F9;
  116. min-height: 100vh;
  117. .banner{
  118. }
  119. .search-box{
  120. padding: 28rpx 24rpx;
  121. width: 702rpx;
  122. background: #FFFFFF;
  123. border-radius: 16rpx 16rpx 16rpx 16rpx;
  124. margin: -224rpx 24rpx 20rpx;
  125. position: relative;
  126. // top: -224rpx;
  127. box-sizing: border-box;
  128. .address-box{
  129. display: flex;
  130. align-items: center;
  131. padding-bottom: 30rpx;
  132. .address{
  133. flex: 1;
  134. font-weight: 600;
  135. font-size: 32rpx;
  136. color: #222222;
  137. white-space: nowrap;
  138. overflow: hidden;
  139. text-overflow: ellipsis;
  140. }
  141. .more{
  142. width: 48rpx;
  143. height: 48rpx;
  144. margin: 0 16rpx;
  145. }
  146. .nearby{
  147. font-weight: 300;
  148. font-size: 24rpx;
  149. color: #222222;
  150. }
  151. .position{
  152. width: 48rpx;
  153. height: 48rpx;
  154. }
  155. }
  156. .chooose-box{
  157. padding: 78rpx 0 24rpx;
  158. display: flex;
  159. align-items: center;
  160. justify-content: space-between;
  161. border-top:1rpx solid #F0F0F0;
  162. border-bottom: 1rpx solid #F0F0F0;
  163. .time-box{
  164. display: flex;
  165. align-items: flex-end;
  166. .start-time,.end-time{
  167. font-weight: 600;
  168. font-size: 32rpx;
  169. color: #222222;
  170. position: relative;
  171. }
  172. .start-time::before{
  173. content: '入住';
  174. position: absolute;
  175. top:calc(-100% - 20rpx);
  176. left: 0;
  177. font-weight: 300;
  178. font-size: 24rpx;
  179. color: #222222;
  180. }
  181. .end-time::before{
  182. content: '离店';
  183. position: absolute;
  184. top:calc(-100% - 20rpx);
  185. left: 0;
  186. font-weight: 300;
  187. font-size: 24rpx;
  188. color: #222222;
  189. }
  190. .line{
  191. font-weight: 600;
  192. font-size: 32rpx;
  193. color: #222222;
  194. margin: 0 16rpx;
  195. }
  196. .day{
  197. font-weight: 300;
  198. font-size: 28rpx;
  199. color: #222222;
  200. margin-left: 16rpx;
  201. vertical-align: bottom;
  202. }
  203. }
  204. .total{
  205. display: flex;
  206. align-items: center;
  207. font-weight: 300;
  208. font-size: 24rpx;
  209. color: #222222;
  210. .more{
  211. width: 48rpx;
  212. height: 48rpx;
  213. }
  214. }
  215. }
  216. .input-box{
  217. position: relative;
  218. line-height: 84rpx;
  219. border-bottom: 1rpx solid #F0F0F0;
  220. .input{
  221. width: 100%;
  222. height: 84rpx;
  223. line-height: 84rpx;
  224. padding-right: 48rpx;
  225. font-size: 24rpx;
  226. color: #222222;
  227. }
  228. .more{
  229. width: 48rpx;
  230. height: 48rpx;
  231. position: absolute;
  232. top: 50%;
  233. right: 0%;
  234. transform: translateY(-50%);
  235. }
  236. }
  237. .btn-box{
  238. padding-top: 28rpx;
  239. .btn{
  240. height: 80rpx;
  241. background: #EE4320;
  242. border-radius: 40rpx;
  243. font-weight: 600;
  244. font-size: 28rpx;
  245. color: #FFFFFF;
  246. }
  247. }
  248. }
  249. .zs-list {
  250. display: flex;
  251. flex-wrap: wrap;
  252. justify-content: space-between;
  253. padding: 0 24rpx;
  254. .left {
  255. .adv-swiper{
  256. width: 340rpx;
  257. height: 444rpx;
  258. margin-bottom: 25rpx;
  259. .adv-item{
  260. width: 340rpx;
  261. height: 444rpx;
  262. }
  263. }
  264. }
  265. .ad{
  266. width: 340rpx;
  267. border-radius: 16rpx;
  268. }
  269. .hotel-item {
  270. width: 340rpx;
  271. margin-bottom: 20rpx;
  272. // box-shadow: 0rpx 0rpx 24rpx 2rpx rgba(0, 0, 0, 0.08);
  273. border-radius: 16rpx;
  274. background: #fff;
  275. .icon {
  276. width: 100%;
  277. height: 300rpx;
  278. border-radius: 16rpx 16rpx 0 0;
  279. }
  280. .info{
  281. flex: 1;
  282. padding: 16rpx;
  283. display: flex;
  284. flex-direction: column;
  285. justify-content: space-between;
  286. position: relative;
  287. .title{
  288. font-size: 28rpx;
  289. font-weight: bold;
  290. overflow: hidden;
  291. text-overflow: ellipsis;
  292. /* 弹性伸缩盒子模型显示 */
  293. display: -webkit-box;
  294. /* 限制在一个块元素显示的文本的行数 */
  295. -webkit-line-clamp: 2;
  296. /* 设置或检索伸缩盒对象的子元素的排列方式 */
  297. -webkit-box-orient: vertical;
  298. margin-top: 10rpx;
  299. }
  300. .desc{
  301. font-size: 24rpx;
  302. color: #AAAAAA;
  303. overflow: hidden;
  304. text-overflow: ellipsis;
  305. /* 弹性伸缩盒子模型显示 */
  306. display: -webkit-box;
  307. /* 限制在一个块元素显示的文本的行数 */
  308. -webkit-line-clamp: 2;
  309. /* 设置或检索伸缩盒对象的子元素的排列方式 */
  310. -webkit-box-orient: vertical;
  311. margin-top: 12rpx;
  312. }
  313. .price-box{
  314. display: flex;
  315. justify-content: space-between;
  316. align-items: center;
  317. margin-top: 12rpx;
  318. .left{
  319. display: flex;
  320. align-items: flex-end;
  321. .unit{
  322. font-size: 20rpx;
  323. color: $uni-color-primary;
  324. font-weight: bold;
  325. }
  326. .price{
  327. font-size: 32rpx;
  328. color: $uni-color-primary;
  329. font-weight: bold;
  330. }
  331. }
  332. .right{
  333. font-size: 24rpx;
  334. color: #AAAAAA;
  335. }
  336. }
  337. }
  338. }
  339. }
  340. }
  341. </style>