search.vue 22 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574575576577578579580581582583584585586587588589590591592593594595596597598599600601602603604605606607608609610611612613614615616617618619620621622623624625626627628629630631632633634635636637638639640641642643644645646647648649650651652653654655656657658659660661662663664665666667668669670671672673674675676677678679680681682683684685686687688689690691692693694695696697698699700701702703704705706707708709710711712713714715716717718719720721722723724725726727728729730731732733734735736737738739740741742743744745746747748749750751752753754755756757758759760761762763764765766767768769770771772773774775776777778779780781782783784785786787788789790791792793794795796797798799800801802803804805806807808809810811812813814815816817818819820821822823824825826827828829830831832833834835836837838839840841842843844845846847848849850851852853854855856857858859860861862863864865866867868869870871872873874875876877878879880881882883884885886887888889890891892893894895896897898899900901902903904905906907908909910911912913914915916917918919920921922923924925926927928929930931932933934935936937938939940941942943944945946
  1. <template>
  2. <view class="hotelList">
  3. <view class="fixed-box">
  4. <view class="search-box">
  5. <view class="city-box" @click="chooseCity">
  6. <image class="icon" src="../static/blue-position.png" mode=""></image>
  7. <view class="city-name">
  8. {{query.cityName}}
  9. </view>
  10. </view>
  11. <view class="input-box">
  12. <view class="time-box" @click="show = true">
  13. <view class="time">
  14. <view class="label">
  15. </view>
  16. <view class="value">
  17. {{query.checkInDate | filterDate('time')}}
  18. </view>
  19. </view>
  20. <view class="time">
  21. <view class="label">
  22. </view>
  23. <view class="value">
  24. {{query.checkOutDate | filterDate('time')}}
  25. </view>
  26. </view>
  27. </view>
  28. <input class="input" type="text" v-model="query.keyword" placeholder="搜索酒店名/地名/关键词" />
  29. </view>
  30. </view>
  31. <view class="tab-box">
  32. <view class="tab-item" :class="[query.sortKey?'active':'']" @click="handleTab(0)">
  33. 推荐排序
  34. <image class="icon" src="@/static/shop-desc.png" mode=""></image>
  35. </view>
  36. <view class="tab-item" :class="[query.filter.star.length||query.filter.price.length?'active':'']" @click="handleTab(1)">
  37. 档次价格
  38. <image class="icon" src="@/static/shop-desc.png" mode=""></image>
  39. </view>
  40. <view class="tab-item" :class="[query.filter.poiCode?'active':'']" @click="handleTab(2)">
  41. 位置距离
  42. <image class="icon" src="@/static/shop-desc.png" mode=""></image>
  43. </view>
  44. <view class="tab-item" @click="handleTab(3)">
  45. 综合筛选
  46. <image class="icon" src="@/static/shop-desc.png" mode=""></image>
  47. </view>
  48. </view>
  49. </view>
  50. <!-- 列表 -->
  51. <zs-list class="store-box" mt="150rpx" @load="loadMore" :status="status">
  52. <view class="hotel-item" v-for="(item,index) in list" :key="index" @click="goDetail(item.hotelId)">
  53. <zs-img :src="item.picture" type="hotel" width="190rpx" height="296rpx" radius="full" mode="widthFix" ></zs-img>
  54. <view class="info">
  55. <view class="title">
  56. {{item.chineseName}}
  57. <!-- <view :class="[getTag(item.star).tag]">
  58. {{item.starName}}
  59. </view> -->
  60. </view>
  61. <image class="star" v-for="(i,d) in getTag(item.star).num" :key="d" src="../static/star.png" mode=""></image>
  62. <view class="district">
  63. <!-- 观山湖区 -->
  64. </view>
  65. <view class="distance-box">
  66. <view class="distance">
  67. 距你{{item|filterDistance}}公里
  68. </view>
  69. <view class="price-box" v-if="item.price">
  70. <view class="price">
  71. ¥{{item.price}}
  72. </view>
  73. <view class="label">
  74. </view>
  75. </view>
  76. <view class="price-box" v-else>
  77. <view class="label">
  78. 暂无报价
  79. </view>
  80. </view>
  81. </view>
  82. </view>
  83. </view>
  84. </zs-list>
  85. <u-popup :show="show1" :round="16" mode="top" :closeOnClickOverlay="false" @close="show1 = false">
  86. <view class="content">
  87. <view class="search-box">
  88. <view class="city-box">
  89. <image class="icon" src="../static/blue-position.png" mode=""></image>
  90. <view class="city-name">
  91. {{query.cityName}}
  92. </view>
  93. </view>
  94. <view class="input-box">
  95. <view class="time-box" @click="show = true">
  96. <view class="time">
  97. <view class="label">
  98. </view>
  99. <view class="value">
  100. {{query.checkInDate | filterDate('time')}}
  101. </view>
  102. </view>
  103. <view class="time">
  104. <view class="label">
  105. </view>
  106. <view class="value">
  107. {{query.checkOutDate | filterDate('time')}}
  108. </view>
  109. </view>
  110. </view>
  111. <input class="input" type="text" v-model="query.keyword" placeholder="搜索酒店名/地名/关键词" />
  112. </view>
  113. </view>
  114. <view class="tab-box">
  115. <view class="tab-item" :class="[active == 0?'active':'']" @click="handleTab(0)">
  116. {{currentLabel}}
  117. <image class="icon" src="@/static/shop-desc.png" mode=""></image>
  118. </view>
  119. <view class="tab-item" :class="[active == 1?'active':'']" @click="handleTab(1)">
  120. 档次价格
  121. <image class="icon" src="@/static/shop-desc.png" mode=""></image>
  122. </view>
  123. <view class="tab-item" :class="[active == 2?'active':'']" @click="handleTab(2)">
  124. 位置距离
  125. <image class="icon" src="@/static/shop-desc.png" mode=""></image>
  126. </view>
  127. <view class="tab-item" :class="[active == 3?'active':'']" @click="handleTab(3)">
  128. 综合筛选
  129. <image class="icon" src="@/static/shop-desc.png" mode=""></image>
  130. </view>
  131. </view>
  132. <view class="choose-box">
  133. <view class="radio-box box" v-if="active == 0">
  134. <view class="radio" v-for="item in sortList" :key="item.value" @click="chooseTab(item.value,0,item.label)">
  135. <view class="label">
  136. {{item.label}}
  137. </view>
  138. <image class="value" v-if="query.sortKey == item.value" src="../static/checked.png" mode=""></image>
  139. </view>
  140. </view>
  141. <view class="box" v-else-if="active == 1">
  142. <view class="sub-title mb28">
  143. 价格 <text class="price-range">{{`¥${priceValue[0]}~¥${priceValue[1]}`}}</text>
  144. </view>
  145. <zs-slider class="zs-slider" ref="slider" v-model="priceValue" :min="0" :max="2500" :step="10" :blockWidth="40" @end="moveEnd" />
  146. <view class="price-tab-box">
  147. <view class="price-tab" :class="[index%3!=0?'ml20':'',item.max == curPrice?'active':'']" v-for="(item,index) in priceList" :key="index" @click="choosePrice(item)">
  148. ¥{{item.min}}{{ item.max == 2500?'以上': '-'+item.max}}
  149. </view>
  150. </view>
  151. <view class="sub-title">
  152. 星级/钻级
  153. </view>
  154. <view class="choose-tab-box">
  155. <view class="tab" :class="[index%3!=0?'ml20':'',query.filter.star.indexOf(item.id) != -1?'active':'']" v-for="(item,index) in starList" :key="item.id" @click="chooseTab(item,1)">
  156. <view class="label">
  157. {{item.label}}
  158. </view>
  159. <view class="desc">
  160. {{item.desc}}
  161. </view>
  162. </view>
  163. </view>
  164. </view>
  165. <!-- <view class="radio-box" v-else-if="active == 2">
  166. <view class="radio" v-for="item in areaList" :key="item.code" @click="chooseTab(item,2)">
  167. <view class="label">
  168. {{item.name}}
  169. </view>
  170. <image class="value" v-if="query.filter.poiCode == item.code" src="../static/checked.png" mode=""></image>
  171. </view>
  172. </view> -->
  173. <view class="filter-box" v-else-if="active == 2">
  174. <view class="left-box">
  175. <view class="left-item" :class="[areaIndex == index?'active':'']" v-for="(item,index) in areaList" :key="index" @click="chooseType(index,'areaIndex')">
  176. {{item.poiName}}
  177. </view>
  178. </view>
  179. <view class="right-box" >
  180. <view class="right-item" v-for="(item,index) in areaList[areaIndex].filter" :key="index" @click="chooseTab(item,2,areaList[areaIndex].poiKey)">
  181. <view class="label" :class="[query.filter.poiCode == item.code?'active':'']">
  182. {{item.name}}
  183. </view>
  184. <image class="value" v-if="query.filter.poiCode == item.code" src="../static/checked.png" mode=""></image>
  185. </view>
  186. </view>
  187. </view>
  188. <view class="filter-box" v-else-if="active == 3">
  189. <view class="left-box">
  190. <view class="left-item" :class="[filterIndex == index?'active':'']" v-for="(item,index) in filterObj" :key="index" @click="chooseType(index,'filterIndex')">
  191. {{item.filterName}}
  192. </view>
  193. </view>
  194. <view class="right-box" >
  195. <view class="right-item" v-for="(item,index) in filterObj[filterIndex].pros" :key="index" @click="chooseItem(item)">
  196. <view class="label" :class="[query.filter[filterObj[filterIndex].filterId].indexOf(item.code)!=-1?'active':'']">
  197. {{item.name}}
  198. </view>
  199. <image class="value" v-if="query.filter[filterObj[filterIndex].filterId].indexOf(item.code)!=-1" src="../static/checked.png" mode=""></image>
  200. </view>
  201. </view>
  202. </view>
  203. </view>
  204. </view>
  205. <view class="btn-box">
  206. <view class="btn" type="default" @click="reset">重置</view>
  207. <view class="btn" type="default" @click="submit">完成</view>
  208. </view>
  209. </u-popup>
  210. <u-calendar
  211. startText="住店"
  212. endText="离店"
  213. :monthNum="5"
  214. confirmDisabledText="请选择离店日期"
  215. :show="show"
  216. mode="range"
  217. @confirm="confirm"
  218. @close="show = false"
  219. ref="calendar"
  220. :rowHeight="100"
  221. closeOnClickOverlay
  222. color="#EE4320"
  223. >
  224. </u-calendar>
  225. </view>
  226. </template>
  227. <script>
  228. import {getHotelList} from '@/api/hotel.js';
  229. import {debounce} from '@/utils/tool.js'
  230. export default {
  231. data() {
  232. return {
  233. day:1,
  234. active:0,
  235. show:false,
  236. show1:false,
  237. list: [],
  238. status:'more',
  239. city:'',
  240. query:{
  241. "checkInDate":uni.$u.timeFormat(new Date().getTime(), 'yyyy-mm-dd') ,
  242. "checkOutDate":uni.$u.timeFormat(new Date().getTime()+1000*60*60*24, 'yyyy-mm-dd'),
  243. "cityCode": 0,
  244. "cityName": '',
  245. "filter": {
  246. "brand":[],
  247. "facility":[],
  248. "feature":[],
  249. "star":[],
  250. "price":[10, 2500],
  251. "poiKey": "",
  252. "poiCode": "",
  253. "latitude": '',
  254. "longitude": '',
  255. },
  256. "keyword": "",
  257. "limit": 10,
  258. "returnFilter": 1,
  259. "sortKey": "recommend",
  260. "start": 0
  261. },
  262. currentLabel:'推荐排序',
  263. sortList:[
  264. {
  265. value:'recommend',
  266. label:'推荐排序'
  267. },
  268. {
  269. value:'satisfaction',
  270. label:'口碑'
  271. },
  272. {
  273. value:'price-asc',
  274. label:'起价升序'
  275. },
  276. {
  277. value:'price-desc',
  278. label:'起价降序'
  279. }
  280. ],
  281. priceValue: [10, 2500], // 可以指定默认值
  282. starList:[
  283. // {
  284. // id:1,
  285. // label:'一星级',
  286. // data:[1,0]
  287. // },
  288. {
  289. id:2,
  290. // label:'二星级',
  291. // data:[2,6]
  292. label:'2钻/星及以下',
  293. desc:'经济',
  294. data:[1,0,2,6]
  295. },
  296. {
  297. id:3,
  298. label:'3钻/星',
  299. desc:'舒适',
  300. data:[3,7]
  301. },
  302. {
  303. id:4,
  304. label:'4钻/星',
  305. desc:'高档',
  306. data:[4,8]
  307. },
  308. {
  309. id:5,
  310. label:'5钻/星',
  311. desc:'豪华',
  312. data:[5,9]
  313. },
  314. // {
  315. // id:6,
  316. // label:'经济型'
  317. // },
  318. // {
  319. // id:7,
  320. // label:'舒适型'
  321. // },
  322. // {
  323. // id:8,
  324. // label:'高档型'
  325. // },
  326. // {
  327. // id:9,
  328. // label:'豪华型'
  329. // },
  330. // {
  331. // id:0,
  332. // label:'普通型'
  333. // }
  334. ],
  335. curPrice:'',
  336. priceList:[
  337. {
  338. min:0,
  339. max:150
  340. },
  341. {
  342. min:150,
  343. max:250
  344. },
  345. {
  346. min:250,
  347. max:300
  348. },
  349. {
  350. min:300,
  351. max:350
  352. },
  353. {
  354. min:350,
  355. max:500
  356. },
  357. {
  358. min:500,
  359. max:650
  360. },
  361. {
  362. min:650,
  363. max:800
  364. },
  365. {
  366. min:800,
  367. max:2500
  368. }
  369. ],
  370. areaList:[],//位置筛选
  371. filterObj:{},//综合筛选
  372. areaIndex:0,
  373. filterIndex:0,
  374. location:{
  375. latitude:0,
  376. longitude:0,
  377. }
  378. }
  379. },
  380. filters: {
  381. filterDate: function(value,type) {
  382. let timestamp = new Date(value).getTime()
  383. if(type == 'time'){
  384. return uni.$u.timeFormat(timestamp, 'mm-dd');
  385. }else if(type == 'day'){
  386. let arr = ['日','一','二','三','四','五','六']
  387. let num = new Date(timestamp).getDay()
  388. return `周${arr[num]}`
  389. }
  390. },
  391. filterDistance: function(item) {
  392. let location = JSON.parse(uni.getStorageSync('location'))
  393. /*参数:两地的经纬度数值*/
  394. var radLat1 = location.latitude * Math.PI / 180.0;
  395. var radLat2 = item.latitude* Math.PI / 180.0;
  396. var a = radLat1 - radLat2;
  397. var b = location.longitude* Math.PI / 180.0 - item.longitude* Math.PI / 180.0;
  398. var s = 2 * Math.asin(Math.sqrt(Math.pow(Math.sin(a / 2), 2) +
  399. Math.cos(radLat1) * Math.cos(radLat2) * Math.pow(Math.sin(b / 2), 2)));
  400. s = s * 6378137.0;//地球半径 单位米;
  401. s = Math.round(s * 10000) / 10000 /1000 //输出为千米
  402. s = s.toFixed(2)
  403. return s
  404. }
  405. },
  406. watch: {
  407. 'query.keyword':debounce(function(val) {
  408. this.search()
  409. })
  410. },
  411. methods: {
  412. chooseType(index,key){
  413. this[key] = index
  414. },
  415. chooseItem(item){
  416. let key = this.filterObj[this.filterIndex].filterId
  417. let index = this.query.filter[key].indexOf(item.code)
  418. if(index!=-1){
  419. this.query.filter[key].splice(index,1)
  420. }else{
  421. this.query.filter[key].push(item.code)
  422. }
  423. },
  424. getTag(star){
  425. if(star == 0 ||star == 1){
  426. return {tag:'tag1',num:1}
  427. }else if(star == 2 ||star == 6){
  428. return {tag:'tag2',num:2}
  429. }if(star == 3 ||star == 7){
  430. return {tag:'tag2',num:3}
  431. }if(star == 4 ||star == 8){
  432. return {tag:'tag3',num:4}
  433. }if(star == 5 ||star == 9){
  434. return {tag:'tag3',num:5}
  435. }
  436. },
  437. moveEnd(){
  438. console.log('结束');
  439. this.query.filter.price = [this.priceValue[0]+'-'+this.priceValue[1]]
  440. // this.search()
  441. },
  442. reset(){
  443. this.query.sortKey = "recommend"
  444. this.query.filter.brand = []
  445. this.query.filter.facility = []
  446. this.query.filter.feature = []
  447. this.query.filter.star = []
  448. this.query.filter.price = []
  449. this.query.filter.poiCode = ''
  450. this.query.filter.poiKey = ""
  451. this.query.filter.latitude = ""
  452. this.query.filter.longitude = ""
  453. // this.query.filter.latitude = this.location.latitude
  454. // this.query.filter.longitude = this.location.longitude
  455. this.curPrice = ''
  456. // this.search()
  457. this.$refs.slider.updateValue(10, 2500)
  458. },
  459. submit(){
  460. this.search()
  461. this.show1 = false
  462. },
  463. chooseTab(val,type,label){
  464. if(type == 0){
  465. this.query.sortKey = val
  466. this.currentLabel = label
  467. }else if(type == 1){
  468. // 星级筛选
  469. if(this.query.filter.star.indexOf(val.data[0]) != -1){
  470. val.data.map(item=>{
  471. let index = this.query.filter.star.indexOf(item)
  472. this.query.filter.star.splice(index,1)
  473. })
  474. }else{
  475. this.query.filter.star = this.query.filter.star.concat(val.data)
  476. }
  477. }else if(type == 2){
  478. this.query.filter.poiKey = label
  479. this.query.filter.poiCode = val.code
  480. this.query.filter.latitude = val.latitude
  481. this.query.filter.longitude = val.longitude
  482. }
  483. // this.search()
  484. },
  485. choosePrice(item){
  486. this.curPrice = item.max
  487. this.query.filter.price = [`${item.min}-${item.max}`]
  488. this.$refs.slider.updateValue(item.min, item.max)
  489. // this.search()
  490. },
  491. close(){},
  492. search(){
  493. this.query.start = 0
  494. this.list = []
  495. this.getHotelList()
  496. },
  497. confirm(e) {
  498. console.log(e);
  499. this.show = false
  500. if(e){
  501. console.log(this);
  502. this.day = e.length - 1
  503. this.query.checkInDate = e[0]
  504. this.query.checkOutDate = e[this.day]
  505. this.search()
  506. }
  507. },
  508. loadMore() {
  509. this.getHotelList()
  510. },
  511. chooseCity(){
  512. uni.navigateTo({
  513. url:`/hotel/cityList?backUrl=/hotel/search&key=${this.query.keyword}&checkInDate=${this.query.checkInDate}&checkOutDate=${this.query.checkOutDate}`
  514. })
  515. },
  516. handleTab(val){
  517. this.show1 = true
  518. this.active = val
  519. },
  520. goDetail(id) {
  521. uni.navigateTo({
  522. url:`/hotel/hotelDetail?id=${id}&checkInDate=${this.query.checkInDate}&checkOutDate=${this.query.checkOutDate}&day=${this.day}`
  523. })
  524. },
  525. getHotelList(){
  526. if(this.status == 'loading') return
  527. this.status = 'loading'
  528. let query = JSON.parse(JSON.stringify(this.query))
  529. query.start = query.start*query.limit
  530. getHotelList(query).then(res=>{
  531. if(res.state == 'Success'){
  532. this.list = this.list.concat(res.content.data.hotelList)
  533. if(!this.areaList.length){
  534. let filterList = res.content.data.filter
  535. filterList.map((item,index)=>{
  536. if(item.filterName == '位置'){
  537. this.areaList = item.pros
  538. filterList.splice(index,1)
  539. // item.pros.splice(0,1)
  540. }else if(item.filterName == '星级'){
  541. filterList.splice(index,1)
  542. }
  543. })
  544. this.filterObj = filterList
  545. console.log(2222222,this.filterObj);
  546. }else{
  547. this.query.returnFilter = 0
  548. }
  549. if((this.list.length) >= res.content.data.count){
  550. this.status = 'noMore'
  551. }else{
  552. this.status = 'more'
  553. this.query.start++
  554. }
  555. }
  556. }).catch(()=>{
  557. this.status = 'more'
  558. })
  559. }
  560. },
  561. onLoad(options) {
  562. this.query.cityName = options.cityName || uni.getStorageSync('city').replace('市','')
  563. this.location = JSON.parse(uni.getStorageSync('location'))
  564. this.query.keyword = options.key
  565. this.query.checkInDate = options.checkInDate
  566. this.query.checkOutDate = options.checkOutDate
  567. if(options.isNear == 1){
  568. this.query.filter.latitude = this.location.latitude
  569. this.query.filter.longitude = this.location.longitude
  570. }
  571. this.day = options.day
  572. this.getHotelList()
  573. }
  574. }
  575. </script>
  576. <style lang="scss" >
  577. .hotelList{
  578. padding: 0 24rpx;
  579. .fixed-box{
  580. position: fixed;
  581. top: 0%;
  582. left: 0%;
  583. z-index: 2;
  584. width: 100%;
  585. background: #fff;
  586. }
  587. .search-box{
  588. display: flex;
  589. align-items: center;
  590. padding: 0 24rpx;
  591. .city-box{
  592. display: flex;
  593. align-items: center;
  594. font-weight: 600;
  595. font-size: 28rpx;
  596. color: #222222;
  597. .icon{
  598. width: 30rpx;
  599. height: 30rpx;
  600. }
  601. .city-name{
  602. font-weight: 600;
  603. font-size: 28rpx;
  604. color: #222222;
  605. max-width: 120rpx;
  606. white-space: nowrap;
  607. overflow: hidden;
  608. text-overflow: ellipsis;
  609. }
  610. }
  611. .input-box{
  612. // width: 590rpx;
  613. flex: 1;
  614. height: 72rpx;
  615. background: #F6F6F6;
  616. border-radius: 32rpx;
  617. margin-left: 20rpx;
  618. padding: 0 20rpx;
  619. box-sizing: border-box;
  620. display: flex;
  621. align-items: center;
  622. .time-box{
  623. display: flex;
  624. flex-direction: column;
  625. justify-content: space-around;
  626. .time{
  627. display: flex;
  628. align-items: center;
  629. .label{
  630. font-size: 22rpx;
  631. color: #AAAAAA;
  632. }
  633. .value{
  634. font-size: 22rpx;
  635. color: #222222;
  636. padding-left: 10rpx;
  637. }
  638. }
  639. }
  640. .input{
  641. flex: 1;
  642. margin-left: 20rpx;
  643. font-size: 24rpx;
  644. color: #AAAAAA;
  645. }
  646. }
  647. }
  648. .tab-box{
  649. display: flex;
  650. align-items: center;
  651. padding: 20rpx 0;
  652. max-height: 800rpx;
  653. overflow: auto;
  654. .tab-item{
  655. flex: 1;
  656. display: flex;
  657. align-items: center;
  658. justify-content: center;
  659. font-size: 26rpx;
  660. .icon{
  661. width: 32rpx;
  662. height: 32rpx;
  663. }
  664. }
  665. .tab-item.active{
  666. color: #FF4D3A;
  667. }
  668. }
  669. .radio-box{
  670. max-height: 800rpx;
  671. overflow: auto;
  672. .radio{
  673. padding: 20rpx 0;
  674. display: flex;
  675. align-items: center;
  676. justify-content: space-between;
  677. .label{
  678. font-size: 26rpx;
  679. color: #222222;
  680. }
  681. .value{
  682. width: 30rpx;
  683. height: 30rpx;
  684. }
  685. }
  686. }
  687. .filter-box{
  688. display: flex;
  689. .left-box{
  690. flex: 0 0 156rpx;
  691. height: 500rpx;
  692. overflow: auto;
  693. background: #F0F0F0;
  694. .left-item{
  695. line-height: 90rpx;
  696. text-indent: 24rpx;
  697. font-size: 24rpx;
  698. color: #222222;
  699. }
  700. .left-item.active{
  701. color: #EE4320;
  702. font-weight: bold;
  703. background: #fff;
  704. }
  705. }
  706. .right-box{
  707. flex: 1;
  708. height: 500rpx;
  709. overflow: auto;
  710. background: #fff;
  711. padding: 0 20rpx;
  712. .right-item{
  713. display: flex;
  714. justify-content: space-between;
  715. align-items: center;
  716. height: 90rpx;
  717. box-sizing: border-box;
  718. border-bottom:1rpx solid #F0F0F0;
  719. .label{
  720. font-size: 26rpx;
  721. color: #222222;
  722. }
  723. .label.active{
  724. color: #FF4D3A;
  725. }
  726. .value{
  727. width: 30rpx;
  728. height: 30rpx;
  729. }
  730. }
  731. }
  732. }
  733. .zs-list {
  734. margin-top: 20rpx;
  735. .hotel-item.disable{
  736. filter: grayscale(1);
  737. }
  738. .hotel-item {
  739. display: flex;
  740. align-items: center;
  741. background: #fff;
  742. border-bottom: 1rpx solid #F0F0F0;
  743. padding: 14rpx 0;
  744. .info{
  745. padding-left: 20rpx;
  746. flex: 1;
  747. .title{
  748. font-weight: 600;
  749. font-size: 32rpx;
  750. color: #222222;
  751. line-height: 50rpx;
  752. // width: 300rpx;
  753. // white-space: nowrap;
  754. // overflow: hidden;
  755. // text-overflow: ellipsis;
  756. // margin-top: 20rpx;
  757. }
  758. .district{
  759. display: flex;
  760. align-items: center;
  761. font-size: 24rpx;
  762. color: #AAAAAA;
  763. margin-top: 20rpx;
  764. }
  765. .star{
  766. width: 21rpx;
  767. height: 17rpx;
  768. margin-left: 3rpx;
  769. }
  770. .distance-box{
  771. display: flex;
  772. align-items: center;
  773. justify-content: space-between;
  774. .distance{
  775. font-size: 24rpx;
  776. color: #AAAAAA;
  777. margin-top: 20rpx;
  778. }
  779. .price-box{
  780. display: flex;
  781. align-items: center;
  782. .price{
  783. font-weight: 600;
  784. font-size: 36rpx;
  785. color: #FF4D3A;
  786. }
  787. .label{
  788. font-size: 24rpx;
  789. color: #AAAAAA;
  790. }
  791. }
  792. }
  793. }
  794. }
  795. }
  796. .content{
  797. padding: 20rpx 0;
  798. .choose-box{
  799. .box{
  800. padding: 0 24rpx;
  801. }
  802. .choose-tab-box{
  803. display: flex;
  804. flex-wrap: wrap;
  805. padding-bottom: 20rpx;
  806. .tab{
  807. display: flex;
  808. flex-direction: column;
  809. justify-content: center;
  810. width: 220rpx;
  811. height: 100rpx;
  812. text-align: center;
  813. background: #F0F0F0;
  814. border-radius: 8rpx 8rpx 8rpx 8rpx;
  815. box-sizing: border-box;
  816. margin-top: 20rpx;
  817. .label{
  818. font-size: 24rpx;
  819. color: #222222;
  820. }
  821. .desc{
  822. font-size: 20rpx;
  823. color: #AAAAAA;
  824. margin-top: 6rpx;
  825. }
  826. }
  827. .tab.active{
  828. background: #FEECE8;
  829. color: #EE4320;
  830. }
  831. }
  832. .price-tab-box{
  833. display: flex;
  834. flex-wrap: wrap;
  835. padding-top: 20rpx;
  836. .price-tab{
  837. width: 220rpx;
  838. height: 52rpx;
  839. line-height: 52rpx;
  840. text-align: center;
  841. background: #F0F0F0;
  842. border-radius: 8rpx 8rpx 8rpx 8rpx;
  843. font-size: 24rpx;
  844. color: #222222;
  845. box-sizing: border-box;
  846. margin-top: 20rpx;
  847. }
  848. .price-tab.active{
  849. background: #FEECE8;
  850. color: #EE4320;
  851. }
  852. }
  853. }
  854. .sub-title{
  855. font-size: 28rpx;
  856. font-weight: bold;
  857. margin-top: 20rpx;
  858. // margin: 20rpx 0;
  859. .price-range{
  860. font-weight: 300;
  861. font-size: 28rpx;
  862. color: #EE4320;
  863. }
  864. }
  865. .mb28{
  866. margin-bottom: 28rpx!important;
  867. }
  868. .mt60{
  869. margin-top: 60rpx!important;
  870. }
  871. .zs-slider{
  872. width: 92%;
  873. // margin-bottom: 60rpx;
  874. }
  875. }
  876. .ml20{
  877. margin-left: 20rpx;
  878. }
  879. .btn-box{
  880. display: flex;
  881. align-items: center;
  882. justify-content: center;
  883. padding: 20rpx 0;
  884. .btn{
  885. width: 200rpx;
  886. height: 70rpx;
  887. line-height: 70rpx;
  888. text-align: center;
  889. border-radius: 35rpx;
  890. background: #F0F0F0;
  891. font-size: 28rpx;
  892. color: #AAAAAA;
  893. }
  894. .btn+.btn{
  895. background: #EE4320;
  896. color: #fff;
  897. margin-left: 20rpx;
  898. }
  899. }
  900. .u-safe-bottom{
  901. display: none!important;
  902. }
  903. }
  904. </style>