search.vue 22 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574575576577578579580581582583584585586587588589590591592593594595596597598599600601602603604605606607608609610611612613614615616617618619620621622623624625626627628629630631632633634635636637638639640641642643644645646647648649650651652653654655656657658659660661662663664665666667668669670671672673674675676677678679680681682683684685686687688689690691692693694695696697698699700701702703704705706707708709710711712713714715716717718719720721722723724725726727728729730731732733734735736737738739740741742743744745746747748749750751752753754755756757758759760761762763764765766767768769770771772773774775776777778779780781782783784785786787788789790791792793794795796797798799800801802803804805806807808809810811812813814815816817818819820821822823824825826827828829830831832833834835836837838839840841842843844845846847848849850851852853854855856857858859860861862863864865866867868869870871872873874875876877878879880881882883884885886887888889890891892893894895896897898899900901902903904905906907908909910911912913914915916917918919920921922923924925926927928929930931932933934935936937938939940941942943944945946947
  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. districtList:JSON.parse(uni.getStorageSync('districtList')),
  263. currentLabel:'推荐排序',
  264. sortList:[
  265. {
  266. value:'recommend',
  267. label:'推荐排序'
  268. },
  269. {
  270. value:'satisfaction',
  271. label:'口碑'
  272. },
  273. {
  274. value:'price-asc',
  275. label:'起价升序'
  276. },
  277. {
  278. value:'price-desc',
  279. label:'起价降序'
  280. }
  281. ],
  282. priceValue: [10, 2500], // 可以指定默认值
  283. starList:[
  284. // {
  285. // id:1,
  286. // label:'一星级',
  287. // data:[1,0]
  288. // },
  289. {
  290. id:2,
  291. // label:'二星级',
  292. // data:[2,6]
  293. label:'2钻/星及以下',
  294. desc:'经济',
  295. data:[1,0,2,6]
  296. },
  297. {
  298. id:3,
  299. label:'3钻/星',
  300. desc:'舒适',
  301. data:[3,7]
  302. },
  303. {
  304. id:4,
  305. label:'4钻/星',
  306. desc:'高档',
  307. data:[4,8]
  308. },
  309. {
  310. id:5,
  311. label:'5钻/星',
  312. desc:'豪华',
  313. data:[5,9]
  314. },
  315. // {
  316. // id:6,
  317. // label:'经济型'
  318. // },
  319. // {
  320. // id:7,
  321. // label:'舒适型'
  322. // },
  323. // {
  324. // id:8,
  325. // label:'高档型'
  326. // },
  327. // {
  328. // id:9,
  329. // label:'豪华型'
  330. // },
  331. // {
  332. // id:0,
  333. // label:'普通型'
  334. // }
  335. ],
  336. curPrice:'',
  337. priceList:[
  338. {
  339. min:0,
  340. max:150
  341. },
  342. {
  343. min:150,
  344. max:250
  345. },
  346. {
  347. min:250,
  348. max:300
  349. },
  350. {
  351. min:300,
  352. max:350
  353. },
  354. {
  355. min:350,
  356. max:500
  357. },
  358. {
  359. min:500,
  360. max:650
  361. },
  362. {
  363. min:650,
  364. max:800
  365. },
  366. {
  367. min:800,
  368. max:2500
  369. }
  370. ],
  371. areaList:[],//位置筛选
  372. filterObj:{},//综合筛选
  373. areaIndex:0,
  374. filterIndex:0,
  375. location:{
  376. latitude:0,
  377. longitude:0,
  378. }
  379. }
  380. },
  381. filters: {
  382. filterDate: function(value,type) {
  383. let timestamp = new Date(value).getTime()
  384. if(type == 'time'){
  385. return uni.$u.timeFormat(timestamp, 'mm-dd');
  386. }else if(type == 'day'){
  387. let arr = ['日','一','二','三','四','五','六']
  388. let num = new Date(timestamp).getDay()
  389. return `周${arr[num]}`
  390. }
  391. },
  392. filterDistance: function(item) {
  393. let location = JSON.parse(uni.getStorageSync('location'))
  394. /*参数:两地的经纬度数值*/
  395. var radLat1 = location.latitude * Math.PI / 180.0;
  396. var radLat2 = item.latitude* Math.PI / 180.0;
  397. var a = radLat1 - radLat2;
  398. var b = location.longitude* Math.PI / 180.0 - item.longitude* Math.PI / 180.0;
  399. var s = 2 * Math.asin(Math.sqrt(Math.pow(Math.sin(a / 2), 2) +
  400. Math.cos(radLat1) * Math.cos(radLat2) * Math.pow(Math.sin(b / 2), 2)));
  401. s = s * 6378137.0;//地球半径 单位米;
  402. s = Math.round(s * 10000) / 10000 /1000 //输出为千米
  403. s = s.toFixed(2)
  404. return s
  405. }
  406. },
  407. watch: {
  408. 'query.keyword':debounce(function(val) {
  409. this.search()
  410. })
  411. },
  412. methods: {
  413. chooseType(index,key){
  414. this[key] = index
  415. },
  416. chooseItem(item){
  417. let key = this.filterObj[this.filterIndex].filterId
  418. let index = this.query.filter[key].indexOf(item.code)
  419. if(index!=-1){
  420. this.query.filter[key].splice(index,1)
  421. }else{
  422. this.query.filter[key].push(item.code)
  423. }
  424. },
  425. getTag(star){
  426. if(star == 0 ||star == 1){
  427. return {tag:'tag1',num:1}
  428. }else if(star == 2 ||star == 6){
  429. return {tag:'tag2',num:2}
  430. }if(star == 3 ||star == 7){
  431. return {tag:'tag2',num:3}
  432. }if(star == 4 ||star == 8){
  433. return {tag:'tag3',num:4}
  434. }if(star == 5 ||star == 9){
  435. return {tag:'tag3',num:5}
  436. }
  437. },
  438. moveEnd(){
  439. console.log('结束');
  440. this.query.filter.price = [this.priceValue[0]+'-'+this.priceValue[1]]
  441. // this.search()
  442. },
  443. reset(){
  444. this.query.sortKey = "recommend"
  445. this.query.filter.brand = []
  446. this.query.filter.facility = []
  447. this.query.filter.feature = []
  448. this.query.filter.star = []
  449. this.query.filter.price = []
  450. this.query.filter.poiCode = ''
  451. this.query.filter.poiKey = ""
  452. this.query.filter.latitude = ""
  453. this.query.filter.longitude = ""
  454. // this.query.filter.latitude = this.location.latitude
  455. // this.query.filter.longitude = this.location.longitude
  456. this.curPrice = ''
  457. // this.search()
  458. this.$refs.slider.updateValue(10, 2500)
  459. },
  460. submit(){
  461. this.search()
  462. this.show1 = false
  463. },
  464. chooseTab(val,type,label){
  465. if(type == 0){
  466. this.query.sortKey = val
  467. this.currentLabel = label
  468. }else if(type == 1){
  469. // 星级筛选
  470. if(this.query.filter.star.indexOf(val.data[0]) != -1){
  471. val.data.map(item=>{
  472. let index = this.query.filter.star.indexOf(item)
  473. this.query.filter.star.splice(index,1)
  474. })
  475. }else{
  476. this.query.filter.star = this.query.filter.star.concat(val.data)
  477. }
  478. }else if(type == 2){
  479. this.query.filter.poiKey = label
  480. this.query.filter.poiCode = val.code
  481. this.query.filter.latitude = val.latitude
  482. this.query.filter.longitude = val.longitude
  483. }
  484. // this.search()
  485. },
  486. choosePrice(item){
  487. this.curPrice = item.max
  488. this.query.filter.price = [`${item.min}-${item.max}`]
  489. this.$refs.slider.updateValue(item.min, item.max)
  490. // this.search()
  491. },
  492. close(){},
  493. search(){
  494. this.query.start = 0
  495. this.list = []
  496. this.getHotelList()
  497. },
  498. confirm(e) {
  499. console.log(e);
  500. this.show = false
  501. if(e){
  502. console.log(this);
  503. this.day = e.length - 1
  504. this.query.checkInDate = e[0]
  505. this.query.checkOutDate = e[this.day]
  506. this.search()
  507. }
  508. },
  509. loadMore() {
  510. this.getHotelList()
  511. },
  512. chooseCity(){
  513. uni.navigateTo({
  514. url:`/hotel/cityList?backUrl=/hotel/search&key=${this.query.keyword}&checkInDate=${this.query.checkInDate}&checkOutDate=${this.query.checkOutDate}`
  515. })
  516. },
  517. handleTab(val){
  518. this.show1 = true
  519. this.active = val
  520. },
  521. goDetail(id) {
  522. uni.navigateTo({
  523. url:`/hotel/hotelDetail?id=${id}&checkInDate=${this.query.checkInDate}&checkOutDate=${this.query.checkOutDate}&day=${this.day}`
  524. })
  525. },
  526. getHotelList(){
  527. if(this.status == 'loading') return
  528. this.status = 'loading'
  529. let query = JSON.parse(JSON.stringify(this.query))
  530. query.start = query.start*query.limit
  531. getHotelList(query).then(res=>{
  532. if(res.state == 'Success'){
  533. this.list = this.list.concat(res.content.data.hotelList)
  534. if(!this.areaList.length){
  535. let filterList = res.content.data.filter
  536. filterList.map((item,index)=>{
  537. if(item.filterName == '位置'){
  538. this.areaList = item.pros
  539. filterList.splice(index,1)
  540. // item.pros.splice(0,1)
  541. }else if(item.filterName == '星级'){
  542. filterList.splice(index,1)
  543. }
  544. })
  545. this.filterObj = filterList
  546. console.log(2222222,this.filterObj);
  547. }else{
  548. this.query.returnFilter = 0
  549. }
  550. if((this.list.length) >= res.content.data.count){
  551. this.status = 'noMore'
  552. }else{
  553. this.status = 'more'
  554. this.query.start++
  555. }
  556. }
  557. }).catch(()=>{
  558. this.status = 'more'
  559. })
  560. }
  561. },
  562. onLoad(options) {
  563. this.query.cityName = options.cityName || uni.getStorageSync('city').replace('市','')
  564. this.location = JSON.parse(uni.getStorageSync('location'))
  565. this.query.keyword = options.key
  566. this.query.checkInDate = options.checkInDate
  567. this.query.checkOutDate = options.checkOutDate
  568. if(options.isNear == 1){
  569. this.query.filter.latitude = this.location.latitude
  570. this.query.filter.longitude = this.location.longitude
  571. }
  572. this.day = options.day
  573. this.getHotelList()
  574. }
  575. }
  576. </script>
  577. <style lang="scss" >
  578. .hotelList{
  579. padding: 0 24rpx;
  580. .fixed-box{
  581. position: fixed;
  582. top: 0%;
  583. left: 0%;
  584. z-index: 2;
  585. width: 100%;
  586. background: #fff;
  587. }
  588. .search-box{
  589. display: flex;
  590. align-items: center;
  591. padding: 0 24rpx;
  592. .city-box{
  593. display: flex;
  594. align-items: center;
  595. font-weight: 600;
  596. font-size: 28rpx;
  597. color: #222222;
  598. .icon{
  599. width: 30rpx;
  600. height: 30rpx;
  601. }
  602. .city-name{
  603. font-weight: 600;
  604. font-size: 28rpx;
  605. color: #222222;
  606. max-width: 120rpx;
  607. white-space: nowrap;
  608. overflow: hidden;
  609. text-overflow: ellipsis;
  610. }
  611. }
  612. .input-box{
  613. // width: 590rpx;
  614. flex: 1;
  615. height: 72rpx;
  616. background: #F6F6F6;
  617. border-radius: 32rpx;
  618. margin-left: 20rpx;
  619. padding: 0 20rpx;
  620. box-sizing: border-box;
  621. display: flex;
  622. align-items: center;
  623. .time-box{
  624. display: flex;
  625. flex-direction: column;
  626. justify-content: space-around;
  627. .time{
  628. display: flex;
  629. align-items: center;
  630. .label{
  631. font-size: 22rpx;
  632. color: #AAAAAA;
  633. }
  634. .value{
  635. font-size: 22rpx;
  636. color: #222222;
  637. padding-left: 10rpx;
  638. }
  639. }
  640. }
  641. .input{
  642. flex: 1;
  643. margin-left: 20rpx;
  644. font-size: 24rpx;
  645. color: #AAAAAA;
  646. }
  647. }
  648. }
  649. .tab-box{
  650. display: flex;
  651. align-items: center;
  652. padding: 20rpx 0;
  653. max-height: 800rpx;
  654. overflow: auto;
  655. .tab-item{
  656. flex: 1;
  657. display: flex;
  658. align-items: center;
  659. justify-content: center;
  660. font-size: 26rpx;
  661. .icon{
  662. width: 32rpx;
  663. height: 32rpx;
  664. }
  665. }
  666. .tab-item.active{
  667. color: #FF4D3A;
  668. }
  669. }
  670. .radio-box{
  671. max-height: 800rpx;
  672. overflow: auto;
  673. .radio{
  674. padding: 20rpx 0;
  675. display: flex;
  676. align-items: center;
  677. justify-content: space-between;
  678. .label{
  679. font-size: 26rpx;
  680. color: #222222;
  681. }
  682. .value{
  683. width: 30rpx;
  684. height: 30rpx;
  685. }
  686. }
  687. }
  688. .filter-box{
  689. display: flex;
  690. .left-box{
  691. flex: 0 0 156rpx;
  692. height: 500rpx;
  693. overflow: auto;
  694. background: #F0F0F0;
  695. .left-item{
  696. line-height: 90rpx;
  697. text-indent: 24rpx;
  698. font-size: 24rpx;
  699. color: #222222;
  700. }
  701. .left-item.active{
  702. color: #EE4320;
  703. font-weight: bold;
  704. background: #fff;
  705. }
  706. }
  707. .right-box{
  708. flex: 1;
  709. height: 500rpx;
  710. overflow: auto;
  711. background: #fff;
  712. padding: 0 20rpx;
  713. .right-item{
  714. display: flex;
  715. justify-content: space-between;
  716. align-items: center;
  717. height: 90rpx;
  718. box-sizing: border-box;
  719. border-bottom:1rpx solid #F0F0F0;
  720. .label{
  721. font-size: 26rpx;
  722. color: #222222;
  723. }
  724. .label.active{
  725. color: #FF4D3A;
  726. }
  727. .value{
  728. width: 30rpx;
  729. height: 30rpx;
  730. }
  731. }
  732. }
  733. }
  734. .zs-list {
  735. margin-top: 20rpx;
  736. .hotel-item.disable{
  737. filter: grayscale(1);
  738. }
  739. .hotel-item {
  740. display: flex;
  741. align-items: center;
  742. background: #fff;
  743. border-bottom: 1rpx solid #F0F0F0;
  744. padding: 14rpx 0;
  745. .info{
  746. padding-left: 20rpx;
  747. flex: 1;
  748. .title{
  749. font-weight: 600;
  750. font-size: 32rpx;
  751. color: #222222;
  752. line-height: 50rpx;
  753. // width: 300rpx;
  754. // white-space: nowrap;
  755. // overflow: hidden;
  756. // text-overflow: ellipsis;
  757. // margin-top: 20rpx;
  758. }
  759. .district{
  760. display: flex;
  761. align-items: center;
  762. font-size: 24rpx;
  763. color: #AAAAAA;
  764. margin-top: 20rpx;
  765. }
  766. .star{
  767. width: 21rpx;
  768. height: 17rpx;
  769. margin-left: 3rpx;
  770. }
  771. .distance-box{
  772. display: flex;
  773. align-items: center;
  774. justify-content: space-between;
  775. .distance{
  776. font-size: 24rpx;
  777. color: #AAAAAA;
  778. margin-top: 20rpx;
  779. }
  780. .price-box{
  781. display: flex;
  782. align-items: center;
  783. .price{
  784. font-weight: 600;
  785. font-size: 36rpx;
  786. color: #FF4D3A;
  787. }
  788. .label{
  789. font-size: 24rpx;
  790. color: #AAAAAA;
  791. }
  792. }
  793. }
  794. }
  795. }
  796. }
  797. .content{
  798. padding: 20rpx 0;
  799. .choose-box{
  800. .box{
  801. padding: 0 24rpx;
  802. }
  803. .choose-tab-box{
  804. display: flex;
  805. flex-wrap: wrap;
  806. padding-bottom: 20rpx;
  807. .tab{
  808. display: flex;
  809. flex-direction: column;
  810. justify-content: center;
  811. width: 220rpx;
  812. height: 100rpx;
  813. text-align: center;
  814. background: #F0F0F0;
  815. border-radius: 8rpx 8rpx 8rpx 8rpx;
  816. box-sizing: border-box;
  817. margin-top: 20rpx;
  818. .label{
  819. font-size: 24rpx;
  820. color: #222222;
  821. }
  822. .desc{
  823. font-size: 20rpx;
  824. color: #AAAAAA;
  825. margin-top: 6rpx;
  826. }
  827. }
  828. .tab.active{
  829. background: #FEECE8;
  830. color: #EE4320;
  831. }
  832. }
  833. .price-tab-box{
  834. display: flex;
  835. flex-wrap: wrap;
  836. padding-top: 20rpx;
  837. .price-tab{
  838. width: 220rpx;
  839. height: 52rpx;
  840. line-height: 52rpx;
  841. text-align: center;
  842. background: #F0F0F0;
  843. border-radius: 8rpx 8rpx 8rpx 8rpx;
  844. font-size: 24rpx;
  845. color: #222222;
  846. box-sizing: border-box;
  847. margin-top: 20rpx;
  848. }
  849. .price-tab.active{
  850. background: #FEECE8;
  851. color: #EE4320;
  852. }
  853. }
  854. }
  855. .sub-title{
  856. font-size: 28rpx;
  857. font-weight: bold;
  858. margin-top: 20rpx;
  859. // margin: 20rpx 0;
  860. .price-range{
  861. font-weight: 300;
  862. font-size: 28rpx;
  863. color: #EE4320;
  864. }
  865. }
  866. .mb28{
  867. margin-bottom: 28rpx!important;
  868. }
  869. .mt60{
  870. margin-top: 60rpx!important;
  871. }
  872. .zs-slider{
  873. width: 92%;
  874. // margin-bottom: 60rpx;
  875. }
  876. }
  877. .ml20{
  878. margin-left: 20rpx;
  879. }
  880. .btn-box{
  881. display: flex;
  882. align-items: center;
  883. justify-content: center;
  884. padding: 20rpx 0;
  885. .btn{
  886. width: 200rpx;
  887. height: 70rpx;
  888. line-height: 70rpx;
  889. text-align: center;
  890. border-radius: 35rpx;
  891. background: #F0F0F0;
  892. font-size: 28rpx;
  893. color: #AAAAAA;
  894. }
  895. .btn+.btn{
  896. background: #EE4320;
  897. color: #fff;
  898. margin-left: 20rpx;
  899. }
  900. }
  901. .u-safe-bottom{
  902. display: none!important;
  903. }
  904. }
  905. </style>