home3.vue 25 KB

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