home3.vue 25 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574575576577578579580581582583584585586587588589590591592593594595596597598599600601602603604605606607608609610611612613614615616617618619620621622623624625626627628629630631632633634635636637638639640641642643644645646647648649650651652653654655656657658659660661662663664665666667668669670671672673674675676677678679680681682683684685686687688689690691692693694695696697698699700701702703704705706707708709710711712713714715716717718719720721722723724725726727728729730731732733734735736737738739740741742743744745746747748749750751752753754755756757758759760761762763764765766767768769770771772773774775776777778779780781782783784785786787788789790791792793794795796797798799800801802803804805806807808809810811812813814815816817818819820821822823824825826827828829830831832833834835836837838839840841842843844845846847848849850851852853854855856857858859860861862863864865866867868869870871872873874875876877878879880881882883884885886887888889890891892893894895896897898899900901902903904905906907908909910911912913914915916917918919920921922923924925926927928929930931932933934935936937938939940941942943944945946947948949950951952953954955956957958959960961962963964965966967968969970971972973974975976977978979980981982983984985986987988989990991992993994995996997998999100010011002100310041005100610071008100910101011101210131014101510161017101810191020102110221023102410251026
  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" v-if="townList.length">
  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 class="noData" v-if="!hotelList.length">
  152. <img src="../../static/images/noData.png" />
  153. 暂无推荐数据
  154. </view>
  155. </view>
  156. </view>
  157. <!-- 选择乡镇弹窗区域 -->
  158. <uni-popup ref="popup" type="center">
  159. <view class="popup_body">
  160. <view class="body_header">
  161. <img src="../../static/my/popup_title.png" />
  162. <view class="header_title">请选择乡镇</view>
  163. <img src="../../static/my/popup_title.png" />
  164. </view>
  165. <view class="body_content">
  166. <view class="content_box" v-for="(item, index) in popList" :key="index" @click="handleChooseTown(item.name)">
  167. <img v-if="index === 0" src="https://chtech.ncjti.edu.cn/hotelReservation/image/1.png" mode="aspectFill" />
  168. <img v-if="index === 1" src="https://chtech.ncjti.edu.cn/hotelReservation/image/2.png" mode="aspectFill" />
  169. <img v-if="index === 2" src="https://chtech.ncjti.edu.cn/hotelReservation/image/3.png" mode="aspectFill" />
  170. <img v-if="index === 3" src="https://chtech.ncjti.edu.cn/hotelReservation/image/4.png" mode="aspectFill" />
  171. <img v-if="index === 4" src="https://chtech.ncjti.edu.cn/hotelReservation/image/5.png" mode="aspectFill" />
  172. <img v-if="index === 5" src="https://chtech.ncjti.edu.cn/hotelReservation/image/6.png" mode="aspectFill" />
  173. <img v-if="index === 6" src="https://chtech.ncjti.edu.cn/hotelReservation/image/7.png" mode="aspectFill" />
  174. <img v-if="index === 7" src="https://chtech.ncjti.edu.cn/hotelReservation/image/8.png" mode="aspectFill" />
  175. <img v-if="index === 8" src="https://chtech.ncjti.edu.cn/hotelReservation/image/9.png" mode="aspectFill" />
  176. <img v-if="index === 9" src="https://chtech.ncjti.edu.cn/hotelReservation/image/10.png" mode="aspectFill" />
  177. <img v-if="index === 10" src="https://chtech.ncjti.edu.cn/hotelReservation/image/11.png" mode="aspectFill" />
  178. <img v-if="index === 11" src="https://chtech.ncjti.edu.cn/hotelReservation/image/12.png" mode="aspectFill" />
  179. <view class="box_town">{{ item.name }}</view>
  180. <view class="box_count">剩{{ item.residueNumber }}间</view>
  181. </view>
  182. </view>
  183. </view>
  184. </uni-popup>
  185. </view>
  186. </template>
  187. <script>
  188. export default {
  189. data() {
  190. return {
  191. // 用户定位经度
  192. myLng: 0,
  193. // 用户定位纬度
  194. myLat: 0,
  195. // 是否显示距离差
  196. showdDistance: false,
  197. // 搜索框绑定数据
  198. keywords: '',
  199. // 当前页
  200. page: 1,
  201. // 每页多少条
  202. rows: 6,
  203. // 总条数
  204. total: null,
  205. // 地区数组
  206. placeList: [
  207. {
  208. name: '靖安县'
  209. }
  210. ],
  211. // 当前选择地区索引
  212. placeIndex: 0,
  213. // 选择乡镇弹窗数据
  214. popList: [],
  215. // 民宿列表数组
  216. hotelList: [],
  217. // 当前乡镇
  218. town: '',
  219. level: '',
  220. townList: [],
  221. headerType: false,
  222. // 状态栏高度
  223. statusBarH: 0,
  224. // 胶囊按钮栏高度
  225. customBarH: 0
  226. }
  227. },
  228. created() {
  229. // 获取系统信息
  230. uni.getSystemInfo({
  231. success: (e) => {
  232. // 获取状态栏高度
  233. this.statusBarH = e.statusBarHeight + 10
  234. // // 获取菜单按钮栏高度
  235. let custom = uni.getMenuButtonBoundingClientRect()
  236. this.customBarH = custom.height + 10
  237. }
  238. })
  239. },
  240. mounted() {
  241. // 开启转发功能
  242. uni.showShareMenu({
  243. withShareTicket: true,
  244. menus: ['shareAppMessage', 'shareTimeline']
  245. })
  246. },
  247. onReachBottom() {
  248. if (this.hotelList.length < this.total) {
  249. this.page++
  250. this.getHotelList()
  251. } else {
  252. uni.showToast({
  253. title: '没有更多数据了',
  254. icon: 'none'
  255. })
  256. }
  257. },
  258. onPageScroll(e) {
  259. if (e.scrollTop > 100) {
  260. this.headerType = true
  261. } else {
  262. this.headerType = false
  263. }
  264. },
  265. onPullDownRefresh() {
  266. this.hotelList = []
  267. this.page = 1
  268. this.getLocation()
  269. this.getResidueCount()
  270. setTimeout(() => {
  271. uni.stopPullDownRefresh()
  272. }, 1000)
  273. },
  274. onLoad() {
  275. this.getLocation()
  276. this.getResidueCount()
  277. },
  278. methods: {
  279. // 获取用户当前位置
  280. getLocation() {
  281. uni.getSetting({
  282. success: (res) => {
  283. if (!res.authSetting['scope.userLocation']) {
  284. uni.authorize({
  285. scope: 'scope.userLocation',
  286. success: (res) => {
  287. // 授权成功
  288. uni.getLocation({
  289. type: 'gcj02',
  290. success: (res) => {
  291. this.myLat = res.latitude
  292. this.myLng = res.longitude
  293. this.showdDistance = true
  294. this.getHotelList()
  295. }
  296. })
  297. },
  298. fail: () => {
  299. uni.showModal({
  300. content: '获取定位权限失败将会影响使用部分功能,是否去设置打开?',
  301. confirmText: '确认',
  302. cancelText: '取消',
  303. success: (res) => {
  304. if (res.confirm) {
  305. uni.openSetting({
  306. success: (res) => {
  307. console.log(res)
  308. this.getLocation()
  309. }
  310. })
  311. } else {
  312. this.showdDistance = false
  313. this.getHotelList()
  314. uni.showToast({
  315. title: '获取定位权限失败',
  316. icon: 'none'
  317. })
  318. }
  319. }
  320. })
  321. }
  322. })
  323. } else {
  324. uni.getLocation({
  325. type: 'gcj02',
  326. success: (res) => {
  327. this.myLat = res.latitude
  328. this.myLng = res.longitude
  329. this.showdDistance = true
  330. this.getHotelList()
  331. }
  332. })
  333. }
  334. }
  335. })
  336. },
  337. handleGoDetail() {
  338. uni.navigateTo({
  339. url: `/pages/strategyDetatil/strategyDetatil`
  340. })
  341. },
  342. // 获取民宿列表
  343. async getHotelList() {
  344. const res = await this.$myRequest({
  345. url: '/mhotel/ahphomePage.action',
  346. data: {
  347. // queryValue: this.keywords,
  348. page: this.page,
  349. rows: this.rows,
  350. type: 3,
  351. // hotel_township: this.placeList[this.placeIndex].id || '',
  352. userId: uni.getStorageSync('userInfo') ? uni.getStorageSync('userInfo').id : ''
  353. }
  354. })
  355. // console.log(res)
  356. if (res.code === 200) {
  357. this.hotelList = [...this.hotelList, ...res.data.pageList]
  358. this.total = res.data.total
  359. // 如果定位成功则获取和民宿之间的距离
  360. if (this.showdDistance && this.hotelList.length) {
  361. this.hotelList.forEach((ele) => {
  362. let lat = ele.hpositionWens.split(',')[0]
  363. let lng = ele.hpositionWens.split(',')[1]
  364. ele.distance = this.calculateDistance(lat, lng)
  365. })
  366. }
  367. }
  368. },
  369. handleOpen() {
  370. this.$refs.popup.open()
  371. // this.getResidueCount()
  372. },
  373. // 获取乡镇
  374. async getResidueCount() {
  375. const res = await this.$myRequest({
  376. url: '/mhotel/ahpgetResidueCount.action'
  377. })
  378. // console.log(res)
  379. if (res.code === 200) {
  380. let temNum = 0
  381. res.data.forEach((ele) => {
  382. temNum += ele.residueNumber
  383. })
  384. res.data.unshift({
  385. name: '靖安县',
  386. residueNumber: temNum
  387. })
  388. this.popList = res.data
  389. this.townList = this.changeList(this.popList, 3)
  390. }
  391. },
  392. // 变成二维数组
  393. changeList(arr, num) {
  394. let newArr = []
  395. const total = Math.ceil(arr.length / num)
  396. for (let i = 0; i < total; i++) {
  397. let a = arr.slice(i * num, (i + 1) * num)
  398. newArr.push(a)
  399. }
  400. return newArr
  401. },
  402. // 弹窗点击选择乡镇地址回调
  403. handleChooseTown(name) {
  404. this.town = name
  405. this.$refs.popup.close()
  406. },
  407. handleChooseTown2(name) {
  408. // this.town = name
  409. uni.navigateTo({
  410. url: `/pages/home/home?town=${name}&keywords=${this.keywords}&level=${this.level}`
  411. })
  412. },
  413. handleChooseLv() {
  414. uni.showActionSheet({
  415. itemList: ['白金', '金宿', '银宿'],
  416. success: (res) => {
  417. if (res.tapIndex === 0) {
  418. this.level = '白金'
  419. } else if (res.tapIndex === 1) {
  420. this.level = '金宿'
  421. } else if (res.tapIndex === 2) {
  422. this.level = '银宿'
  423. }
  424. }
  425. })
  426. },
  427. handleSearch() {
  428. uni.navigateTo({
  429. url: `/pages/home/home?town=${this.town}&keywords=${this.keywords}&level=${this.level}`
  430. })
  431. },
  432. handleTest() {
  433. uni.showToast({
  434. title: '功能开发中',
  435. icon: 'none',
  436. mask: true
  437. })
  438. },
  439. handleGoSetMeal() {
  440. uni.navigateTo({
  441. url: '/pages/setMeal/setMeal'
  442. })
  443. },
  444. goPageDetail(item) {
  445. uni.navigateTo({
  446. url: `/pages/detail/detail?id=${item.id}&distance=${item.distance}`
  447. })
  448. },
  449. // 计算两个点之间的距离
  450. calculateDistance(lat, lng) {
  451. let centerLat = lat
  452. let centerLng = lng
  453. let red1 = (this.myLat * Math.PI) / 180.0
  454. let red2 = (centerLat * Math.PI) / 180.0
  455. let a = red1 - red2
  456. let b = (this.myLng * Math.PI) / 180.0 - (centerLng * Math.PI) / 180.0
  457. let R = 6378137
  458. 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)))
  459. let res = (distance / 1000).toFixed(2) * 1
  460. return res
  461. }
  462. }
  463. }
  464. </script>
  465. <style lang="scss" scoped>
  466. .container {
  467. display: flex;
  468. flex-direction: column;
  469. min-height: 100vh;
  470. overflow-y: auto;
  471. background-color: #f2f2f2;
  472. .header {
  473. position: relative;
  474. height: 505rpx;
  475. img {
  476. width: 100%;
  477. height: 100%;
  478. border-radius: 0 0 20rpx 20rpx;
  479. }
  480. .img {
  481. position: absolute;
  482. top: 135rpx;
  483. left: 61rpx;
  484. width: 160rpx;
  485. height: 40rpx;
  486. }
  487. .img2 {
  488. position: absolute;
  489. top: 193rpx;
  490. left: 38rpx;
  491. width: 268rpx;
  492. height: 88rpx;
  493. }
  494. .header_msg {
  495. position: absolute;
  496. top: 283rpx;
  497. left: 38rpx;
  498. display: flex;
  499. justify-content: center;
  500. align-items: center;
  501. width: 291rpx;
  502. height: 65rpx;
  503. font-size: 31rpx;
  504. color: #fff;
  505. border-radius: 16rpx;
  506. background: rgba(255, 255, 255, 0.2);
  507. }
  508. }
  509. .header2 {
  510. z-index: 999;
  511. position: fixed;
  512. top: 0;
  513. left: 0;
  514. right: 0;
  515. text-align: center;
  516. background-color: #fff;
  517. .title {
  518. font-size: 34rpx;
  519. }
  520. }
  521. .content {
  522. z-index: 1;
  523. margin: -102rpx auto 0;
  524. width: 690rpx;
  525. border-radius: 12rpx 12rpx 0 0;
  526. background-color: #f2f2f2;
  527. .search {
  528. box-sizing: border-box;
  529. padding: 0 28rpx;
  530. width: 690rpx;
  531. height: 353rpx;
  532. border-radius: 12rpx;
  533. background-color: #fff;
  534. .search_town {
  535. display: flex;
  536. justify-content: space-between;
  537. align-items: center;
  538. height: 89rpx;
  539. color: #a6a6a6;
  540. font-size: 32rpx;
  541. border-bottom: 1rpx solid #e6e6e6;
  542. img {
  543. width: 40rpx;
  544. height: 40rpx;
  545. }
  546. }
  547. .active {
  548. font-weight: bold;
  549. color: #000;
  550. }
  551. .search_center {
  552. display: flex;
  553. align-items: center;
  554. height: 89rpx;
  555. color: #a6a6a6;
  556. font-size: 28rpx;
  557. img {
  558. width: 40rpx;
  559. height: 40rpx;
  560. }
  561. .center_input {
  562. margin-right: 12rpx;
  563. width: 250rpx;
  564. color: #000;
  565. font-weight: bold;
  566. }
  567. .img {
  568. margin-right: 12rpx;
  569. }
  570. .center_level {
  571. flex: 1;
  572. margin-left: 24rpx;
  573. font-weight: 400;
  574. }
  575. .active {
  576. font-weight: bold;
  577. color: #000;
  578. }
  579. .img2 {
  580. margin-left: auto;
  581. }
  582. }
  583. .search_btn {
  584. display: flex;
  585. justify-content: center;
  586. align-items: center;
  587. margin-top: 23rpx;
  588. width: 623rpx;
  589. height: 100rpx;
  590. border-radius: 57rpx;
  591. color: #fff;
  592. font-size: 32rpx;
  593. background: linear-gradient(90deg, #2697ef 0%, #5e35eb 100%);
  594. }
  595. }
  596. .icons {
  597. display: flex;
  598. justify-content: space-around;
  599. align-items: center;
  600. margin: 20rpx auto;
  601. width: 690rpx;
  602. height: 180rpx;
  603. border-radius: 12rpx;
  604. background-color: #fff;
  605. .icon_item {
  606. display: flex;
  607. flex-direction: column;
  608. align-items: center;
  609. width: 20%;
  610. .item_top {
  611. display: flex;
  612. align-items: center;
  613. justify-content: center;
  614. width: 60rpx;
  615. height: 60rpx;
  616. border-radius: 50%;
  617. img {
  618. width: 28rpx;
  619. height: 27rpx;
  620. }
  621. .img2 {
  622. width: 40rpx;
  623. height: 25.5rpx;
  624. }
  625. .img3 {
  626. width: 31rpx;
  627. height: 21rpx;
  628. }
  629. }
  630. .color {
  631. background-color: #d8e8e8;
  632. }
  633. .color2 {
  634. background-color: #c2f2d5;
  635. }
  636. .color3 {
  637. background-color: #f7d4ba;
  638. }
  639. .color4 {
  640. background-color: #fae1e2;
  641. }
  642. .color5 {
  643. background-color: #d0e0f2;
  644. }
  645. .item_bottom {
  646. margin-top: 6rpx;
  647. font-size: 28rpx;
  648. }
  649. }
  650. }
  651. .swiper {
  652. margin: 20rpx auto 0;
  653. width: 690rpx;
  654. height: 214rpx;
  655. border-radius: 12rpx;
  656. background-color: #fff;
  657. .swiper_item {
  658. display: flex;
  659. justify-content: space-around;
  660. align-items: center;
  661. width: 100%;
  662. height: 100%;
  663. .item_box {
  664. position: relative;
  665. width: 195rpx;
  666. height: 128rpx;
  667. border-radius: 12rpx;
  668. color: #fff;
  669. img {
  670. width: 195rpx;
  671. height: 128rpx;
  672. border-radius: 12rpx;
  673. }
  674. .box_town {
  675. position: absolute;
  676. top: 30rpx;
  677. left: 0;
  678. right: 0;
  679. text-align: center;
  680. font-size: 28rpx;
  681. font-weight: bold;
  682. }
  683. .box_count {
  684. position: absolute;
  685. top: 75rpx;
  686. left: 0;
  687. right: 0;
  688. text-align: center;
  689. font-size: 18rpx;
  690. }
  691. }
  692. }
  693. }
  694. .body {
  695. margin: 0 auto;
  696. width: 690rpx;
  697. .body_top {
  698. display: flex;
  699. align-items: center;
  700. height: 89rpx;
  701. .circle {
  702. width: 30rpx;
  703. height: 30rpx;
  704. border-radius: 50%;
  705. background-color: #485bed;
  706. }
  707. .color {
  708. margin-left: -15rpx;
  709. opacity: 0.5;
  710. background-color: #fff;
  711. }
  712. .top_title {
  713. margin-left: 15rpx;
  714. font-size: 32rpx;
  715. font-weight: bold;
  716. }
  717. .top_msg {
  718. margin-top: 5rpx;
  719. margin-left: 12rpx;
  720. color: #666666;
  721. font-size: 24rpx;
  722. }
  723. .top_more {
  724. display: flex;
  725. align-items: center;
  726. margin-left: auto;
  727. color: #a6a6a6;
  728. font-size: 24rpx;
  729. img {
  730. width: 32rpx;
  731. height: 32rpx;
  732. }
  733. }
  734. }
  735. .body_strategy {
  736. display: flex;
  737. box-sizing: border-box;
  738. padding: 20rpx;
  739. margin-bottom: 10rpx;
  740. width: 690rpx;
  741. height: 235rpx;
  742. border-radius: 12rpx;
  743. background-color: #fff;
  744. img {
  745. width: 253rpx;
  746. height: 190rpx;
  747. border-radius: 7rpx;
  748. }
  749. .strategy_info {
  750. flex: 1;
  751. display: flex;
  752. flex-direction: column;
  753. justify-content: space-between;
  754. margin-left: 20rpx;
  755. width: 500rpx;
  756. height: 170rpx;
  757. font-size: 24rpx;
  758. color: #666666;
  759. overflow: hidden;
  760. .info_title {
  761. font-size: 32rpx;
  762. font-weight: bold;
  763. color: #000;
  764. overflow: hidden;
  765. text-overflow: ellipsis;
  766. white-space: nowrap;
  767. }
  768. .info_time {
  769. }
  770. .info_tags {
  771. display: flex;
  772. .tag {
  773. margin-right: 10rpx;
  774. box-sizing: border-box;
  775. padding: 0 5rpx;
  776. height: 35rpx;
  777. color: #1e7dfb;
  778. font-size: 20rpx;
  779. border-radius: 30rpx;
  780. border: 1rpx solid #1e7dfb;
  781. }
  782. }
  783. .info_desc {
  784. display: -webkit-box;
  785. -webkit-box-orient: vertical;
  786. -webkit-line-clamp: 2;
  787. overflow: hidden;
  788. }
  789. }
  790. }
  791. .body_list {
  792. display: flex;
  793. flex-wrap: wrap;
  794. justify-content: space-between;
  795. .list_item {
  796. width: 335rpx;
  797. box-sizing: border-box;
  798. margin-bottom: 20rpx;
  799. .item-img {
  800. width: 100%;
  801. height: 223rpx;
  802. border-radius: 18rpx 18rpx 0 0;
  803. box-sizing: border-box;
  804. }
  805. .descrition {
  806. display: flex;
  807. flex-direction: column;
  808. width: 100%;
  809. border-radius: 0 0 18rpx 18rpx;
  810. box-sizing: border-box;
  811. background: rgba(255, 255, 255, 1);
  812. margin-top: -10rpx;
  813. .title {
  814. font-size: 28rpx;
  815. font-weight: 600;
  816. padding: 20rpx 20rpx 10rpx;
  817. color: rgba(0, 0, 0, 1);
  818. overflow: hidden;
  819. white-space: nowrap;
  820. text-overflow: ellipsis;
  821. }
  822. .type {
  823. padding: 5rpx 20rpx;
  824. height: 40rpx;
  825. font-size: 24rpx;
  826. color: #a6a6a6;
  827. }
  828. .distance {
  829. padding: 10rpx 20rpx;
  830. font-size: 24rpx;
  831. color: #a6a6a6;
  832. }
  833. .detail {
  834. display: flex;
  835. flex-direction: row;
  836. justify-content: space-between;
  837. align-items: center;
  838. padding: 0 20rpx 20rpx 20rpx;
  839. color: rgba(0, 0, 0, 1);
  840. .img {
  841. width: 40rpx;
  842. height: 40rpx;
  843. }
  844. .price {
  845. .txt1 {
  846. font-size: 36rpx;
  847. font-weight: 600;
  848. color: rgba(255, 87, 51, 1);
  849. }
  850. .txt2 {
  851. font-size: 24rpx;
  852. font-weight: 400;
  853. color: #a6a6a6;
  854. }
  855. }
  856. .score {
  857. font-size: 24rpx;
  858. font-weight: 400;
  859. padding-top: 10rpx;
  860. color: rgba(166, 166, 166, 1);
  861. }
  862. }
  863. }
  864. }
  865. }
  866. .noData {
  867. display: flex;
  868. flex-direction: column;
  869. justify-content: center;
  870. align-items: center;
  871. padding-bottom: 65rpx;
  872. img {
  873. margin-top: 80rpx;
  874. width: 600rpx;
  875. height: 600rpx;
  876. }
  877. }
  878. }
  879. }
  880. .popup_body {
  881. width: 618rpx;
  882. height: 687rpx;
  883. border-radius: 21rpx;
  884. background-color: #fff;
  885. .body_header {
  886. display: flex;
  887. justify-content: center;
  888. align-items: center;
  889. position: relative;
  890. height: 113rpx;
  891. border-bottom: 1rpx solid #e6e6e6;
  892. img {
  893. width: 16rpx;
  894. height: 16rpx;
  895. }
  896. .header_title {
  897. margin: 0 10rpx;
  898. font-size: 34rpx;
  899. font-weight: bold;
  900. color: #0f194d;
  901. }
  902. }
  903. .body_content {
  904. display: grid;
  905. grid-template-columns: repeat(auto-fill, 160rpx);
  906. gap: 28rpx;
  907. box-sizing: border-box;
  908. padding: 26rpx 40rpx 50rpx;
  909. .content_box {
  910. position: relative;
  911. width: 160rpx;
  912. height: 105rpx;
  913. color: #fff;
  914. border-radius: 10rpx;
  915. img {
  916. width: 160rpx;
  917. height: 105rpx;
  918. border-radius: 10rpx;
  919. }
  920. .box_town {
  921. position: absolute;
  922. top: 20rpx;
  923. left: 0;
  924. right: 0;
  925. text-align: center;
  926. font-size: 28rpx;
  927. font-weight: bold;
  928. }
  929. .box_count {
  930. position: absolute;
  931. top: 62rpx;
  932. left: 0;
  933. right: 0;
  934. text-align: center;
  935. font-size: 18rpx;
  936. }
  937. }
  938. }
  939. }
  940. }
  941. </style>