home3.vue 25 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574575576577578579580581582583584585586587588589590591592593594595596597598599600601602603604605606607608609610611612613614615616617618619620621622623624625626627628629630631632633634635636637638639640641642643644645646647648649650651652653654655656657658659660661662663664665666667668669670671672673674675676677678679680681682683684685686687688689690691692693694695696697698699700701702703704705706707708709710711712713714715716717718719720721722723724725726727728729730731732733734735736737738739740741742743744745746747748749750751752753754755756757758759760761762763764765766767768769770771772773774775776777778779780781782783784785786787788789790791792793794795796797798799800801802803804805806807808809810811812813814815816817818819820821822823824825826827828829830831832833834835836837838839840841842843844845846847848849850851852853854855856857858859860861862863864865866867868869870871872873874875876877878879880881882883884885886887888889890891892893894895896897898899900901902903904905906907908909910911912913914915916917918919920921922923924925926927928929930931932933934935936937938939940941942943944945946947948949950951952953954955956957958959960961962963964965966967968969970971972973974975976977978979980981982983984985986987988989990991992993994995996997998
  1. <template>
  2. <view class="container">
  3. <view class="header2" :style="{ height: customBarH * 2 + 'rpx', paddingTop: statusBarH * 2 + 'rpx' }" v-if="headerType">
  4. <view class="title">靖安乡村民宿</view>
  5. </view>
  6. <!-- 顶部图片区域 -->
  7. <view class="header">
  8. <img mode="aspectFill" src="https://chtech.ncjti.edu.cn/hotelReservation/image/14.png" />
  9. <img class="img" src="https://chtech.ncjti.edu.cn/hotelReservation/image/16.png" />
  10. <img class="img2" src="https://chtech.ncjti.edu.cn/hotelReservation/image/17.png" />
  11. <view class="header_msg">有一种生活叫靖安</view>
  12. </view>
  13. <view class="content">
  14. <!-- 条件筛选区域 -->
  15. <view class="search">
  16. <!-- 选择乡镇区域 -->
  17. <view class="search_town" :class="{ active: town }" @click="handleOpen">
  18. {{ town ? town : '请选择乡镇' }}
  19. <img src="../../static/index/right2.png" />
  20. </view>
  21. <!-- 关键词搜索和民宿级别区域 -->
  22. <view class="search_center">
  23. <view class="center_input">
  24. <input type="text" v-model="keywords" placeholder="民宿/地名/关键词" placeholder-style="color:#A6A6A6;font-weight:400;" />
  25. </view>
  26. <img class="img" src="../../static/index/right2.png" />
  27. |
  28. <view class="center_level" :class="{ active: level }" @click="handleChooseLv">{{ level ? level : '请选择民宿级别' }}</view>
  29. <img class="img2" src="../../static/index/right2.png" @click="handleChooseLv" />
  30. </view>
  31. <!-- 查找按钮区域 -->
  32. <view class="search_btn" @click="handleSearch">查找</view>
  33. </view>
  34. <!-- 图标列表区域 -->
  35. <!-- <view class="icons">
  36. <view class="icon_item" @click="handleTest">
  37. <view class="item_top color">
  38. <img src="../../static/index/icon.png" />
  39. </view>
  40. <view class="item_bottom">推文</view>
  41. </view>
  42. <view class="icon_item" @click="handleTest">
  43. <view class="item_top color2">
  44. <img class="img2" src="../../static/index/icon2.png" />
  45. </view>
  46. <view class="item_bottom">周边</view>
  47. </view>
  48. <view class="icon_item" @click="handleGoSetMeal">
  49. <view class="item_top color3">
  50. <img class="img3" src="../../static/index/icon3.png" />
  51. </view>
  52. <view class="item_bottom">套餐</view>
  53. </view>
  54. <view class="icon_item" @click="handleTest">
  55. <view class="item_top color4">
  56. <img src="../../static/index/icon4.png" />
  57. </view>
  58. <view class="item_bottom">招商</view>
  59. </view>
  60. <view class="icon_item" @click="handleTest">
  61. <view class="item_top color5">
  62. <img src="../../static/index/icon5.png" />
  63. </view>
  64. <view class="item_bottom">其他</view>
  65. </view>
  66. </view> -->
  67. <!-- 轮播图区域 -->
  68. <swiper class="swiper" indicator-dots circular indicator-color="#BBD8FE" indicator-active-color="#1E7DFB" autoplay interval="3000">
  69. <swiper-item v-for="(ele, index) in townList" :key="index">
  70. <view class="swiper_item">
  71. <view class="item_box" v-for="(swi, index2) in ele" :key="index2" @click="handleChooseTown2(swi.name)">
  72. <img v-if="index === 0 && index2 === 0" src="https://chtech.ncjti.edu.cn/hotelReservation/image/1.png" mode="aspectFill" />
  73. <img v-if="index === 0 && index2 === 1" src="https://chtech.ncjti.edu.cn/hotelReservation/image/2.png" mode="aspectFill" />
  74. <img v-if="index === 0 && index2 === 2" src="https://chtech.ncjti.edu.cn/hotelReservation/image/3.png" mode="aspectFill" />
  75. <img v-if="index === 1 && index2 === 0" src="https://chtech.ncjti.edu.cn/hotelReservation/image/4.png" mode="aspectFill" />
  76. <img v-if="index === 1 && index2 === 1" src="https://chtech.ncjti.edu.cn/hotelReservation/image/5.png" mode="aspectFill" />
  77. <img v-if="index === 1 && index2 === 2" src="https://chtech.ncjti.edu.cn/hotelReservation/image/6.png" mode="aspectFill" />
  78. <img v-if="index === 2 && index2 === 0" src="https://chtech.ncjti.edu.cn/hotelReservation/image/7.png" mode="aspectFill" />
  79. <img v-if="index === 2 && index2 === 1" src="https://chtech.ncjti.edu.cn/hotelReservation/image/8.png" mode="aspectFill" />
  80. <img v-if="index === 2 && index2 === 2" src="https://chtech.ncjti.edu.cn/hotelReservation/image/9.png" mode="aspectFill" />
  81. <img v-if="index === 3 && index2 === 0" src="https://chtech.ncjti.edu.cn/hotelReservation/image/10.png" mode="aspectFill" />
  82. <img v-if="index === 3 && index2 === 1" src="https://chtech.ncjti.edu.cn/hotelReservation/image/11.png" mode="aspectFill" />
  83. <img v-if="index === 3 && index2 === 2" src="https://chtech.ncjti.edu.cn/hotelReservation/image/12.png" mode="aspectFill" />
  84. <view class="box_town">{{ swi.name }}</view>
  85. <view class="box_count">剩{{ swi.residueNumber }}间</view>
  86. </view>
  87. </view>
  88. </swiper-item>
  89. </swiper>
  90. <!-- 民宿列表区域 -->
  91. <view class="body">
  92. <!-- 精选攻略区域 -->
  93. <view class="body_top">
  94. <view class="circle"></view>
  95. <view class="circle color"></view>
  96. <view class="top_title">精选攻略 .</view>
  97. <view class="top_msg">宝藏分享社区</view>
  98. <view class="top_more" @click="handleTest">
  99. 更多
  100. <img src="https://chtech.ncjti.edu.cn/hotelReservation/image/13.png" />
  101. </view>
  102. </view>
  103. <view class="body_strategy" @click="handleGoDetail">
  104. <img mode="aspectfill" src="https://chtech.ncjti.edu.cn/hotelReservation/fileload/download/1933617026前台.jpg" />
  105. <view class="strategy_info">
  106. <view class="info_title">这里不是瑞士!是江西靖安!</view>
  107. <!-- <view class="info_time">2023-09-04 15:15:15</view> -->
  108. <view class="info_tags">
  109. <view class="tag">南昌周边游</view>
  110. <view class="tag">江西旅游</view>
  111. <view class="tag">靖安民宿</view>
  112. </view>
  113. <view class="info_desc">
  114. 南昌周边度假的宝藏民宿🏠享受山野间森呼吸🌿很适合逃离城市奔向大自然的快乐躺平☁️阴雨绵绵也抵挡不住它的美☔心向山野 尽请赴约 🍃一房一景 设计独特
  115. 🪐室内有着巨大落地窗🚪地址⛺️宜春市靖安县宁福线中源乡合港村南段组10号交通🚘南昌自驾开车约2H风格⛱民宿是新中式生活美学的格调
  116. 非常高级还配备中餐厅、商务会议室、茶室、休闲娱乐包厢等🎞适合情侣、家庭自驾游玩
  117. 💕🔆附近景区游玩推荐:北岭花海、九岭瀑布、九门楼、九岭尖云海、日出、冰雪、风车、草甸、露营、游客中心、清水平台观景、河道游船、观赏荷花、采莲、客家民俗、农俗活动及客家美食、小吃、果脯、高山滑雪、梯田等
  118. </view>
  119. </view>
  120. </view>
  121. <!-- 精选推荐区域 -->
  122. <view class="body_top">
  123. <view class="circle"></view>
  124. <view class="circle color"></view>
  125. <view class="top_title">精选推荐 .</view>
  126. <view class="top_msg">线上订民宿,住着玩个遍</view>
  127. <view class="top_more" @click="handleTest">
  128. 更多
  129. <img src="https://chtech.ncjti.edu.cn/hotelReservation/image/13.png" />
  130. </view>
  131. </view>
  132. <!-- 列表区域 -->
  133. <view class="body_list">
  134. <!-- 每一个民宿区域 -->
  135. <view class="list_item" v-for="item in hotelList" :key="item.id" @click="goPageDetail(item)">
  136. <image class="item-img" :src="item.coverImg" mode="scaleToFill"></image>
  137. <view class="descrition">
  138. <text class="title">{{ item.hotel_name }}</text>
  139. <text class="type">{{ item.hTypeName }}</text>
  140. <text class="distance">距您直线{{ item.distance }}公里</text>
  141. <view class="detail">
  142. <img class="img" src="../../static/index/hotel.png" />
  143. <view class="price">
  144. <text class="txt1">¥{{ item.min_price }}</text>
  145. <text class="txt2">起</text>
  146. </view>
  147. </view>
  148. </view>
  149. </view>
  150. </view>
  151. </view>
  152. </view>
  153. <!-- 选择乡镇弹窗区域 -->
  154. <uni-popup ref="popup" type="center">
  155. <view class="popup_body">
  156. <view class="body_header">
  157. <img src="../../static/my/popup_title.png" />
  158. <view class="header_title">请选择乡镇</view>
  159. <img src="../../static/my/popup_title.png" />
  160. </view>
  161. <view class="body_content">
  162. <view class="content_box" v-for="(item, index) in popList" :key="index" @click="handleChooseTown(item.name)">
  163. <img v-if="index === 0" src="https://chtech.ncjti.edu.cn/hotelReservation/image/1.png" mode="aspectFill" />
  164. <img v-if="index === 1" src="https://chtech.ncjti.edu.cn/hotelReservation/image/2.png" mode="aspectFill" />
  165. <img v-if="index === 2" src="https://chtech.ncjti.edu.cn/hotelReservation/image/3.png" mode="aspectFill" />
  166. <img v-if="index === 3" src="https://chtech.ncjti.edu.cn/hotelReservation/image/4.png" mode="aspectFill" />
  167. <img v-if="index === 4" src="https://chtech.ncjti.edu.cn/hotelReservation/image/5.png" mode="aspectFill" />
  168. <img v-if="index === 5" src="https://chtech.ncjti.edu.cn/hotelReservation/image/6.png" mode="aspectFill" />
  169. <img v-if="index === 6" src="https://chtech.ncjti.edu.cn/hotelReservation/image/7.png" mode="aspectFill" />
  170. <img v-if="index === 7" src="https://chtech.ncjti.edu.cn/hotelReservation/image/8.png" mode="aspectFill" />
  171. <img v-if="index === 8" src="https://chtech.ncjti.edu.cn/hotelReservation/image/9.png" mode="aspectFill" />
  172. <img v-if="index === 9" src="https://chtech.ncjti.edu.cn/hotelReservation/image/10.png" mode="aspectFill" />
  173. <img v-if="index === 10" src="https://chtech.ncjti.edu.cn/hotelReservation/image/11.png" mode="aspectFill" />
  174. <img v-if="index === 11" src="https://chtech.ncjti.edu.cn/hotelReservation/image/12.png" mode="aspectFill" />
  175. <view class="box_town">{{ item.name }}</view>
  176. <view class="box_count">剩{{ item.residueNumber }}间</view>
  177. </view>
  178. </view>
  179. </view>
  180. </uni-popup>
  181. </view>
  182. </template>
  183. <script>
  184. export default {
  185. data() {
  186. return {
  187. // 用户定位经度
  188. myLng: 0,
  189. // 用户定位纬度
  190. myLat: 0,
  191. // 是否显示距离差
  192. showdDistance: false,
  193. // 搜索框绑定数据
  194. keywords: '',
  195. // 当前页
  196. page: 1,
  197. // 每页多少条
  198. rows: 6,
  199. // 总条数
  200. total: null,
  201. // 地区数组
  202. placeList: [
  203. {
  204. name: '靖安县'
  205. }
  206. ],
  207. // 当前选择地区索引
  208. placeIndex: 0,
  209. // 选择乡镇弹窗数据
  210. popList: [],
  211. // 民宿列表数组
  212. hotelList: [],
  213. // 当前乡镇
  214. town: '',
  215. level: '',
  216. townList: [],
  217. headerType: false,
  218. // 状态栏高度
  219. statusBarH: 0,
  220. // 胶囊按钮栏高度
  221. customBarH: 0
  222. }
  223. },
  224. created() {
  225. // 获取系统信息
  226. uni.getSystemInfo({
  227. success: (e) => {
  228. // 获取状态栏高度
  229. this.statusBarH = e.statusBarHeight + 10
  230. // // 获取菜单按钮栏高度
  231. let custom = uni.getMenuButtonBoundingClientRect()
  232. this.customBarH = custom.height + 10
  233. }
  234. })
  235. },
  236. mounted() {
  237. // 开启转发功能
  238. uni.showShareMenu({
  239. withShareTicket: true,
  240. menus: ['shareAppMessage', 'shareTimeline']
  241. })
  242. },
  243. onReachBottom() {
  244. if (this.hotelList.length < this.total) {
  245. this.page++
  246. this.getHotelList()
  247. } else {
  248. uni.showToast({
  249. title: '没有更多数据了',
  250. icon: 'none'
  251. })
  252. }
  253. },
  254. onPageScroll(e) {
  255. if (e.scrollTop > 100) {
  256. this.headerType = true
  257. } else {
  258. this.headerType = false
  259. }
  260. },
  261. onLoad() {
  262. this.getLocation()
  263. this.getResidueCount()
  264. },
  265. methods: {
  266. // 获取用户当前位置
  267. getLocation() {
  268. uni.getSetting({
  269. success: (res) => {
  270. if (!res.authSetting['scope.userLocation']) {
  271. uni.authorize({
  272. scope: 'scope.userLocation',
  273. success: (res) => {
  274. // 授权成功
  275. uni.getLocation({
  276. type: 'gcj02',
  277. success: (res) => {
  278. this.myLat = res.latitude
  279. this.myLng = res.longitude
  280. this.showdDistance = true
  281. this.getHotelList()
  282. }
  283. })
  284. },
  285. fail: () => {
  286. uni.showModal({
  287. content: '获取定位权限失败将会影响使用部分功能,是否去设置打开?',
  288. confirmText: '确认',
  289. cancelText: '取消',
  290. success: (res) => {
  291. if (res.confirm) {
  292. uni.openSetting({
  293. success: (res) => {
  294. console.log(res)
  295. this.getLocation()
  296. }
  297. })
  298. } else {
  299. this.showdDistance = false
  300. this.getHotelList()
  301. uni.showToast({
  302. title: '获取定位权限失败',
  303. icon: 'none'
  304. })
  305. }
  306. }
  307. })
  308. }
  309. })
  310. } else {
  311. uni.getLocation({
  312. type: 'gcj02',
  313. success: (res) => {
  314. this.myLat = res.latitude
  315. this.myLng = res.longitude
  316. this.showdDistance = true
  317. this.getHotelList()
  318. }
  319. })
  320. }
  321. }
  322. })
  323. },
  324. handleGoDetail() {
  325. uni.navigateTo({
  326. url: `/pages/strategyDetatil/strategyDetatil`
  327. })
  328. },
  329. // 获取民宿列表
  330. async getHotelList() {
  331. const res = await this.$myRequest({
  332. url: '/mhotel/ahphomePage.action',
  333. data: {
  334. // queryValue: this.keywords,
  335. page: this.page,
  336. rows: this.rows,
  337. type: 3,
  338. // hotel_township: this.placeList[this.placeIndex].id || '',
  339. userId: uni.getStorageSync('userInfo') ? uni.getStorageSync('userInfo').id : ''
  340. }
  341. })
  342. // console.log(res)
  343. if (res.code === 200) {
  344. this.hotelList = [...this.hotelList, ...res.data.pageList]
  345. this.total = res.data.total
  346. // 如果定位成功则获取和民宿之间的距离
  347. if (this.showdDistance && this.hotelList.length) {
  348. this.hotelList.forEach((ele) => {
  349. let lat = ele.hpositionWens.split(',')[0]
  350. let lng = ele.hpositionWens.split(',')[1]
  351. ele.distance = this.calculateDistance(lat, lng)
  352. })
  353. }
  354. }
  355. },
  356. handleOpen() {
  357. this.$refs.popup.open()
  358. // this.getResidueCount()
  359. },
  360. // 获取乡镇
  361. async getResidueCount() {
  362. const res = await this.$myRequest({
  363. url: '/mhotel/ahpgetResidueCount.action'
  364. })
  365. // console.log(res)
  366. if (res.code === 200) {
  367. let temNum = 0
  368. res.data.forEach((ele) => {
  369. temNum += ele.residueNumber
  370. })
  371. res.data.unshift({
  372. name: '靖安县',
  373. residueNumber: temNum
  374. })
  375. this.popList = res.data
  376. this.townList = this.changeList(this.popList, 3)
  377. }
  378. },
  379. // 变成二维数组
  380. changeList(arr, num) {
  381. let newArr = []
  382. const total = Math.ceil(arr.length / num)
  383. for (let i = 0; i < total; i++) {
  384. let a = arr.slice(i * num, (i + 1) * num)
  385. newArr.push(a)
  386. }
  387. return newArr
  388. },
  389. // 弹窗点击选择乡镇地址回调
  390. handleChooseTown(name) {
  391. this.town = name
  392. this.$refs.popup.close()
  393. },
  394. handleChooseTown2(name) {
  395. // this.town = name
  396. uni.navigateTo({
  397. url: `/pages/home/home?town=${name}&keywords=${this.keywords}&level=${this.level}`
  398. })
  399. },
  400. handleChooseLv() {
  401. uni.showActionSheet({
  402. itemList: ['白金', '金宿', '银宿'],
  403. success: (res) => {
  404. if (res.tapIndex === 0) {
  405. this.level = '白金'
  406. } else if (res.tapIndex === 1) {
  407. this.level = '金宿'
  408. } else if (res.tapIndex === 2) {
  409. this.level = '银宿'
  410. }
  411. }
  412. })
  413. },
  414. handleSearch() {
  415. uni.navigateTo({
  416. url: `/pages/home/home?town=${this.town}&keywords=${this.keywords}&level=${this.level}`
  417. })
  418. },
  419. handleTest() {
  420. uni.showToast({
  421. title: '功能开发中',
  422. icon: 'none',
  423. mask: true
  424. })
  425. },
  426. handleGoSetMeal() {
  427. uni.navigateTo({
  428. url: '/pages/setMeal/setMeal'
  429. })
  430. },
  431. goPageDetail(item) {
  432. uni.navigateTo({
  433. url: `/pages/detail/detail?id=${item.id}&distance=${item.distance}`
  434. })
  435. },
  436. // 计算两个点之间的距离
  437. calculateDistance(lat, lng) {
  438. let centerLat = lat
  439. let centerLng = lng
  440. let red1 = (this.myLat * Math.PI) / 180.0
  441. let red2 = (centerLat * Math.PI) / 180.0
  442. let a = red1 - red2
  443. let b = (this.myLng * Math.PI) / 180.0 - (centerLng * Math.PI) / 180.0
  444. let R = 6378137
  445. let distance = R * 2 * Math.asin(Math.sqrt(Math.pow(Math.sin(a / 2), 2) + Math.cos(red1) * Math.cos(red2) * Math.pow(Math.sin(b / 2), 2)))
  446. let res = (distance / 1000).toFixed(2) * 1
  447. return res
  448. }
  449. }
  450. }
  451. </script>
  452. <style lang="scss" scoped>
  453. .container {
  454. display: flex;
  455. flex-direction: column;
  456. min-height: 100vh;
  457. overflow-y: auto;
  458. background-color: #f2f2f2;
  459. .header {
  460. position: relative;
  461. height: 505rpx;
  462. img {
  463. width: 100%;
  464. height: 100%;
  465. border-radius: 0 0 20rpx 20rpx;
  466. }
  467. .img {
  468. position: absolute;
  469. top: 135rpx;
  470. left: 61rpx;
  471. width: 160rpx;
  472. height: 40rpx;
  473. }
  474. .img2 {
  475. position: absolute;
  476. top: 193rpx;
  477. left: 38rpx;
  478. width: 268rpx;
  479. height: 88rpx;
  480. }
  481. .header_msg {
  482. position: absolute;
  483. top: 283rpx;
  484. left: 38rpx;
  485. display: flex;
  486. justify-content: center;
  487. align-items: center;
  488. width: 291rpx;
  489. height: 65rpx;
  490. font-size: 31rpx;
  491. color: #fff;
  492. border-radius: 16rpx;
  493. background: rgba(255, 255, 255, 0.2);
  494. }
  495. }
  496. .header2 {
  497. z-index: 999;
  498. position: fixed;
  499. top: 0;
  500. left: 0;
  501. right: 0;
  502. text-align: center;
  503. background-color: #fff;
  504. .title {
  505. font-size: 34rpx;
  506. }
  507. }
  508. .content {
  509. z-index: 1;
  510. margin: -102rpx auto 0;
  511. width: 690rpx;
  512. border-radius: 12rpx 12rpx 0 0;
  513. background-color: #f2f2f2;
  514. .search {
  515. box-sizing: border-box;
  516. padding: 0 28rpx;
  517. width: 690rpx;
  518. height: 353rpx;
  519. border-radius: 12rpx;
  520. background-color: #fff;
  521. .search_town {
  522. display: flex;
  523. justify-content: space-between;
  524. align-items: center;
  525. height: 89rpx;
  526. color: #a6a6a6;
  527. font-size: 32rpx;
  528. border-bottom: 1rpx solid #e6e6e6;
  529. img {
  530. width: 40rpx;
  531. height: 40rpx;
  532. }
  533. }
  534. .active {
  535. font-weight: bold;
  536. color: #000;
  537. }
  538. .search_center {
  539. display: flex;
  540. align-items: center;
  541. height: 89rpx;
  542. color: #a6a6a6;
  543. font-size: 28rpx;
  544. img {
  545. width: 40rpx;
  546. height: 40rpx;
  547. }
  548. .center_input {
  549. margin-right: 12rpx;
  550. width: 250rpx;
  551. color: #000;
  552. font-weight: bold;
  553. }
  554. .img {
  555. margin-right: 12rpx;
  556. }
  557. .center_level {
  558. flex: 1;
  559. margin-left: 24rpx;
  560. font-weight: 400;
  561. }
  562. .active {
  563. font-weight: bold;
  564. color: #000;
  565. }
  566. .img2 {
  567. margin-left: auto;
  568. }
  569. }
  570. .search_btn {
  571. display: flex;
  572. justify-content: center;
  573. align-items: center;
  574. margin-top: 23rpx;
  575. width: 623rpx;
  576. height: 100rpx;
  577. border-radius: 57rpx;
  578. color: #fff;
  579. font-size: 32rpx;
  580. background: linear-gradient(90deg, #2697ef 0%, #5e35eb 100%);
  581. }
  582. }
  583. .icons {
  584. display: flex;
  585. justify-content: space-around;
  586. align-items: center;
  587. margin: 20rpx auto;
  588. width: 690rpx;
  589. height: 180rpx;
  590. border-radius: 12rpx;
  591. background-color: #fff;
  592. .icon_item {
  593. display: flex;
  594. flex-direction: column;
  595. align-items: center;
  596. width: 20%;
  597. .item_top {
  598. display: flex;
  599. align-items: center;
  600. justify-content: center;
  601. width: 60rpx;
  602. height: 60rpx;
  603. border-radius: 50%;
  604. img {
  605. width: 28rpx;
  606. height: 27rpx;
  607. }
  608. .img2 {
  609. width: 40rpx;
  610. height: 25.5rpx;
  611. }
  612. .img3 {
  613. width: 31rpx;
  614. height: 21rpx;
  615. }
  616. }
  617. .color {
  618. background-color: #d8e8e8;
  619. }
  620. .color2 {
  621. background-color: #c2f2d5;
  622. }
  623. .color3 {
  624. background-color: #f7d4ba;
  625. }
  626. .color4 {
  627. background-color: #fae1e2;
  628. }
  629. .color5 {
  630. background-color: #d0e0f2;
  631. }
  632. .item_bottom {
  633. margin-top: 6rpx;
  634. font-size: 28rpx;
  635. }
  636. }
  637. }
  638. .swiper {
  639. margin: 20rpx auto 0;
  640. width: 690rpx;
  641. height: 214rpx;
  642. border-radius: 12rpx;
  643. background-color: #fff;
  644. .swiper_item {
  645. display: flex;
  646. justify-content: space-around;
  647. align-items: center;
  648. width: 100%;
  649. height: 100%;
  650. .item_box {
  651. position: relative;
  652. width: 195rpx;
  653. height: 128rpx;
  654. border-radius: 12rpx;
  655. color: #fff;
  656. img {
  657. width: 195rpx;
  658. height: 128rpx;
  659. border-radius: 12rpx;
  660. }
  661. .box_town {
  662. position: absolute;
  663. top: 30rpx;
  664. left: 0;
  665. right: 0;
  666. text-align: center;
  667. font-size: 28rpx;
  668. font-weight: bold;
  669. }
  670. .box_count {
  671. position: absolute;
  672. top: 75rpx;
  673. left: 0;
  674. right: 0;
  675. text-align: center;
  676. font-size: 18rpx;
  677. }
  678. }
  679. }
  680. }
  681. .body {
  682. margin: 0 auto;
  683. width: 690rpx;
  684. .body_top {
  685. display: flex;
  686. align-items: center;
  687. height: 89rpx;
  688. .circle {
  689. width: 30rpx;
  690. height: 30rpx;
  691. border-radius: 50%;
  692. background-color: #485bed;
  693. }
  694. .color {
  695. margin-left: -15rpx;
  696. opacity: 0.5;
  697. background-color: #fff;
  698. }
  699. .top_title {
  700. margin-left: 15rpx;
  701. font-size: 32rpx;
  702. font-weight: bold;
  703. }
  704. .top_msg {
  705. margin-top: 5rpx;
  706. margin-left: 12rpx;
  707. color: #666666;
  708. font-size: 24rpx;
  709. }
  710. .top_more {
  711. display: flex;
  712. align-items: center;
  713. margin-left: auto;
  714. color: #a6a6a6;
  715. font-size: 24rpx;
  716. img {
  717. width: 32rpx;
  718. height: 32rpx;
  719. }
  720. }
  721. }
  722. .body_strategy {
  723. display: flex;
  724. box-sizing: border-box;
  725. padding: 20rpx;
  726. margin-bottom: 10rpx;
  727. width: 690rpx;
  728. height: 235rpx;
  729. border-radius: 12rpx;
  730. background-color: #fff;
  731. img {
  732. width: 253rpx;
  733. height: 190rpx;
  734. border-radius: 7rpx;
  735. }
  736. .strategy_info {
  737. flex: 1;
  738. display: flex;
  739. flex-direction: column;
  740. justify-content: space-between;
  741. margin-left: 20rpx;
  742. width: 500rpx;
  743. height: 170rpx;
  744. font-size: 24rpx;
  745. color: #666666;
  746. overflow: hidden;
  747. .info_title {
  748. font-size: 32rpx;
  749. font-weight: bold;
  750. color: #000;
  751. overflow: hidden;
  752. text-overflow: ellipsis;
  753. white-space: nowrap;
  754. }
  755. .info_time {
  756. }
  757. .info_tags {
  758. display: flex;
  759. .tag {
  760. margin-right: 10rpx;
  761. box-sizing: border-box;
  762. padding: 0 5rpx;
  763. height: 35rpx;
  764. color: #1e7dfb;
  765. font-size: 20rpx;
  766. border-radius: 30rpx;
  767. border: 1rpx solid #1e7dfb;
  768. }
  769. }
  770. .info_desc {
  771. display: -webkit-box;
  772. -webkit-box-orient: vertical;
  773. -webkit-line-clamp: 2;
  774. overflow: hidden;
  775. }
  776. }
  777. }
  778. .body_list {
  779. display: flex;
  780. flex-wrap: wrap;
  781. justify-content: space-between;
  782. .list_item {
  783. width: 335rpx;
  784. box-sizing: border-box;
  785. margin-bottom: 20rpx;
  786. .item-img {
  787. width: 100%;
  788. height: 223rpx;
  789. border-radius: 18rpx 18rpx 0 0;
  790. box-sizing: border-box;
  791. }
  792. .descrition {
  793. display: flex;
  794. flex-direction: column;
  795. width: 100%;
  796. border-radius: 0 0 18rpx 18rpx;
  797. box-sizing: border-box;
  798. background: rgba(255, 255, 255, 1);
  799. margin-top: -10rpx;
  800. .title {
  801. font-size: 28rpx;
  802. font-weight: 600;
  803. padding: 20rpx 20rpx 10rpx;
  804. color: rgba(0, 0, 0, 1);
  805. overflow: hidden;
  806. white-space: nowrap;
  807. text-overflow: ellipsis;
  808. }
  809. .type {
  810. padding: 5rpx 20rpx;
  811. height: 40rpx;
  812. font-size: 24rpx;
  813. color: #a6a6a6;
  814. }
  815. .distance {
  816. padding: 10rpx 20rpx;
  817. font-size: 24rpx;
  818. color: #a6a6a6;
  819. }
  820. .detail {
  821. display: flex;
  822. flex-direction: row;
  823. justify-content: space-between;
  824. align-items: center;
  825. padding: 0 20rpx 20rpx 20rpx;
  826. color: rgba(0, 0, 0, 1);
  827. .img {
  828. width: 40rpx;
  829. height: 40rpx;
  830. }
  831. .price {
  832. .txt1 {
  833. font-size: 36rpx;
  834. font-weight: 600;
  835. color: rgba(255, 87, 51, 1);
  836. }
  837. .txt2 {
  838. font-size: 24rpx;
  839. font-weight: 400;
  840. color: #a6a6a6;
  841. }
  842. }
  843. .score {
  844. font-size: 24rpx;
  845. font-weight: 400;
  846. padding-top: 10rpx;
  847. color: rgba(166, 166, 166, 1);
  848. }
  849. }
  850. }
  851. }
  852. }
  853. }
  854. }
  855. .popup_body {
  856. width: 618rpx;
  857. height: 687rpx;
  858. border-radius: 21rpx;
  859. background-color: #fff;
  860. .body_header {
  861. display: flex;
  862. justify-content: center;
  863. align-items: center;
  864. position: relative;
  865. height: 113rpx;
  866. border-bottom: 1rpx solid #e6e6e6;
  867. img {
  868. width: 16rpx;
  869. height: 16rpx;
  870. }
  871. .header_title {
  872. margin: 0 10rpx;
  873. font-size: 34rpx;
  874. font-weight: bold;
  875. color: #0f194d;
  876. }
  877. }
  878. .body_content {
  879. display: grid;
  880. grid-template-columns: repeat(auto-fill, 160rpx);
  881. gap: 28rpx;
  882. box-sizing: border-box;
  883. padding: 26rpx 40rpx 50rpx;
  884. .content_box {
  885. position: relative;
  886. width: 160rpx;
  887. height: 105rpx;
  888. color: #fff;
  889. border-radius: 10rpx;
  890. img {
  891. width: 160rpx;
  892. height: 105rpx;
  893. border-radius: 10rpx;
  894. }
  895. .box_town {
  896. position: absolute;
  897. top: 20rpx;
  898. left: 0;
  899. right: 0;
  900. text-align: center;
  901. font-size: 28rpx;
  902. font-weight: bold;
  903. }
  904. .box_count {
  905. position: absolute;
  906. top: 62rpx;
  907. left: 0;
  908. right: 0;
  909. text-align: center;
  910. font-size: 18rpx;
  911. }
  912. }
  913. }
  914. }
  915. }
  916. </style>