search.vue 22 KB

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