home3.vue 25 KB

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