detail.vue 29 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071727374757677787980818283848586878889909192939495969798991001011021031041051061071081091101111121131141151161171181191201211221231241251261271281291301311321331341351361371381391401411421431441451461471481491501511521531541551561571581591601611621631641651661671681691701711721731741751761771781791801811821831841851861871881891901911921931941951961971981992002012022032042052062072082092102112122132142152162172182192202212222232242252262272282292302312322332342352362372382392402412422432442452462472482492502512522532542552562572582592602612622632642652662672682692702712722732742752762772782792802812822832842852862872882892902912922932942952962972982993003013023033043053063073083093103113123133143153163173183193203213223233243253263273283293303313323333343353363373383393403413423433443453463473483493503513523533543553563573583593603613623633643653663673683693703713723733743753763773783793803813823833843853863873883893903913923933943953963973983994004014024034044054064074084094104114124134144154164174184194204214224234244254264274284294304314324334344354364374384394404414424434444454464474484494504514524534544554564574584594604614624634644654664674684694704714724734744754764774784794804814824834844854864874884894904914924934944954964974984995005015025035045055065075085095105115125135145155165175185195205215225235245255265275285295305315325335345355365375385395405415425435445455465475485495505515525535545555565575585595605615625635645655665675685695705715725735745755765775785795805815825835845855865875885895905915925935945955965975985996006016026036046056066076086096106116126136146156166176186196206216226236246256266276286296306316326336346356366376386396406416426436446456466476486496506516526536546556566576586596606616626636646656666676686696706716726736746756766776786796806816826836846856866876886896906916926936946956966976986997007017027037047057067077087097107117127137147157167177187197207217227237247257267277287297307317327337347357367377387397407417427437447457467477487497507517527537547557567577587597607617627637647657667677687697707717727737747757767777787797807817827837847857867877887897907917927937947957967977987998008018028038048058068078088098108118128138148158168178188198208218228238248258268278288298308318328338348358368378388398408418428438448458468478488498508518528538548558568578588598608618628638648658668678688698708718728738748758768778788798808818828838848858868878888898908918928938948958968978988999009019029039049059069079089099109119129139149159169179189199209219229239249259269279289299309319329339349359369379389399409419429439449459469479489499509519529539549559569579589599609619629639649659669679689699709719729739749759769779789799809819829839849859869879889899909919929939949959969979989991000100110021003100410051006100710081009101010111012101310141015101610171018101910201021102210231024102510261027102810291030103110321033103410351036103710381039104010411042104310441045104610471048104910501051105210531054105510561057105810591060106110621063106410651066106710681069107010711072107310741075107610771078107910801081108210831084108510861087108810891090109110921093109410951096109710981099110011011102110311041105110611071108110911101111111211131114111511161117111811191120112111221123112411251126112711281129113011311132113311341135113611371138113911401141114211431144114511461147114811491150115111521153115411551156115711581159116011611162116311641165116611671168116911701171117211731174117511761177117811791180118111821183118411851186118711881189119011911192119311941195119611971198119912001201120212031204120512061207120812091210121112121213121412151216121712181219122012211222122312241225122612271228122912301231123212331234123512361237123812391240124112421243124412451246124712481249125012511252125312541255125612571258125912601261126212631264126512661267126812691270127112721273127412751276127712781279128012811282128312841285128612871288128912901291129212931294129512961297129812991300130113021303130413051306130713081309131013111312131313141315131613171318131913201321132213231324132513261327
  1. <template>
  2. <view class="container" :style="'overflow:' + (showPage ? 'hidden' : 'visible')" v-if="info">
  3. <!-- 顶部分段器区域 -->
  4. <view class="control">
  5. <uni-segmented-control :current="activeIndex" :values="headerList" style-type="text" active-color="#096562" @clickItem="onClickItem" />
  6. </view>
  7. <!-- 顶部民宿图片区域 -->
  8. <view class="banner">
  9. <swiper autoplay circular class="swiper">
  10. <swiper-item class="swiper_item" v-for="item in info.hotelFileInfoList" :key="item.id">
  11. <img mode="aspectFill" class="img" :src="item.url" />
  12. </swiper-item>
  13. </swiper>
  14. <view class="slogan">
  15. <img src="../../static/index/slogan.png" />
  16. </view>
  17. <!-- 720°全景链接区域 -->
  18. <view class="full" v-if="info.linkProUrl" @click="handleGoPull(info.linkProUrl)">
  19. <img src="../../static/index/full.png" />
  20. 720°全景
  21. </view>
  22. <!-- 收藏按钮区域 -->
  23. <view class="collect">
  24. <uni-fav circle bgColorChecked="#096562" :checked="info.is_collect_hotel" @click="changeCollect(info.is_collect_hotel)" />
  25. </view>
  26. </view>
  27. <!-- 民宿详细信息区域 -->
  28. <view class="detail">
  29. <view class="detail_name">{{ info.hotel_name }}</view>
  30. <view class="detail_info">
  31. <view class="info_left">{{ info.fitupTime }}装修 | {{ info.openTime }}开业</view>
  32. <view class="info_right" @click="goPageDetailInfo">
  33. 设施/详情
  34. <img src="../../static/index/right.png" />
  35. </view>
  36. </view>
  37. <view class="detail_group">
  38. <view class="group_item" v-for="item in info.hconfigList" :key="item.id">
  39. <img :src="item.fileUrl" />
  40. {{ item.name }}
  41. </view>
  42. </view>
  43. <view class="address">
  44. <view class="address_left">{{ info.hposition }}</view>
  45. <view class="address_right">
  46. <view class="right_box" @click="handleMap(info)">
  47. <img src="../../static/index/map.png" />
  48. </view>
  49. <view class="right_box" @click="handlePhone(info.managerPhone)">
  50. <img src="../../static/index/phone.png" />
  51. </view>
  52. </view>
  53. </view>
  54. <view class="distance" v-if="distance">距离我{{ distance }}km</view>
  55. </view>
  56. <!-- 房型信息区域 -->
  57. <view class="body">
  58. <!-- 选择日期区域 -->
  59. <view class="body_header" @click="handleOpen()">
  60. <view class="header_start">
  61. <view class="header_top">{{ getWeek(startTime) }}入住</view>
  62. <view class="header_bottom">{{ startTime.slice(5, 7) }}月{{ startTime.slice(8, 10) }}日</view>
  63. </view>
  64. <view class="header_night">
  65. <view class="night_line"></view>
  66. <view class="night_box">{{ nightNum }}晚</view>
  67. <view class="night_line"></view>
  68. </view>
  69. <view class="header_end">
  70. <view class="header_top">{{ getWeek(endTime) }}离店</view>
  71. <view class="header_bottom">{{ endTime.slice(5, 7) }}月{{ endTime.slice(8, 10) }}日</view>
  72. </view>
  73. </view>
  74. <!-- 日历组件 -->
  75. <uv-calendars
  76. ref="calendar"
  77. range
  78. title="选择日期"
  79. start-text="住店"
  80. end-text="离店"
  81. color="#096562"
  82. confirmColor="#096562"
  83. :selected="selected"
  84. :startDate="earlyTime"
  85. :endDate="lateTime"
  86. @monthSwitch="monthSwitch"
  87. @confirm="handleConfirm"
  88. />
  89. <!-- 房型列表区域 -->
  90. <view class="body_content" v-if="list.length">
  91. <!-- 每一个房型盒子区域 -->
  92. <view class="body_box" v-for="item in list" :key="item.id" @click="handleLookDetail(item)">
  93. <view class="box_left">
  94. <img mode="aspectFill" :src="item.fileInfoList[0].url" />
  95. </view>
  96. <view class="box_center">
  97. <view class="center_top">{{ item.hName }}</view>
  98. <view class="center_center">
  99. <view class="center_item" v-if="item.hAreas">{{ item.hAreas }}㎡ 剩余{{ item.remainRooms }}间</view>
  100. </view>
  101. <view class="center_bottom">
  102. <img v-for="item2 in item.hConfigList" :key="item2.id" class="img" :src="item2.fileUrl" />
  103. </view>
  104. </view>
  105. <view class="box_right">
  106. <view class="right_price">
  107. <text>¥</text>
  108. {{ item.price }}
  109. </view>
  110. <view class="right_btn" :class="{ inactive: item.remainRooms * 1 <= 0 }" @click.stop="goPageAffOrder(item)">订</view>
  111. </view>
  112. </view>
  113. <!-- 点击房型弹窗区域 -->
  114. <uv-popup ref="popup" bgColor="none" :safeAreaInsetBottom="false">
  115. <view class="body_pop">
  116. <!-- 轮播图区域 -->
  117. <swiper indicator-dots circular indicator-color="#FFFFFF" indicator-active-color="#096562" class="pop_swiper">
  118. <swiper-item class="pop_swiper_item" v-for="item in roomInfo.fileInfoList" :key="item.id">
  119. <img class="img" :src="item.url" />
  120. </swiper-item>
  121. </swiper>
  122. <!-- 轮播图关闭图标区域 -->
  123. <img class="pop_icon" src="../../static/index/close.png" @click="handleClosePop" />
  124. <view class="pop_body">
  125. <view class="body_title">{{ roomInfo.hName }}</view>
  126. <view class="body_tags">
  127. <view class="tags_item">
  128. <img class="img" src="../../static/index/place.png" />
  129. {{ roomInfo.hAreas }}㎡
  130. </view>
  131. <view class="tags_item" v-for="item2 in roomInfo.hConfigList" :key="item2.id">
  132. <img class="img" :src="item2.fileUrl" />
  133. {{ item2.name }}
  134. </view>
  135. </view>
  136. <view class="body_title2">费用明细</view>
  137. <view class="body_detail">
  138. <!-- <view class="detail_old">¥{{ roomInfo.price }}</view> -->
  139. <!-- <view class="detail_box">
  140. 黄金会员9折
  141. <text>-¥25</text>
  142. </view>
  143. <view class="detail_box">
  144. 活动
  145. <text>-¥2.5</text>
  146. </view> -->
  147. <view class="detail_new">
  148. 每间每晚
  149. <view class="ml_10 color">¥</view>
  150. <view class="price color">{{ roomInfo.price }}</view>
  151. </view>
  152. </view>
  153. <view class="body_bottom">
  154. <view class="bottom_left" @click="handlePhone(info.managerPhone)">
  155. <img class="img" src="../../static/index/phone2.png" />
  156. 联系商家
  157. </view>
  158. <view class="bottom_right">
  159. <text>¥</text>
  160. {{ roomInfo.price }}
  161. <view class="btn" :class="{ inactive: roomInfo.remainRooms * 1 <= 0 }" @click="goPageAffOrder(roomInfo)">预定</view>
  162. </view>
  163. </view>
  164. </view>
  165. </view>
  166. </uv-popup>
  167. </view>
  168. <view class="noData" v-else>
  169. <img src="../../static/images/noData.png" />
  170. 暂无数据
  171. </view>
  172. </view>
  173. <!-- 评价区域 -->
  174. <view class="evaluate">
  175. <view class="evaluate_title">评价</view>
  176. <view class="evaluate_body">
  177. <!-- 评分区域 -->
  178. <view class="header" v-if="score">
  179. <view class="header_box">
  180. <!-- 总评分区域 -->
  181. <view class="box_left">{{ score }}</view>
  182. <view class="box_right">
  183. <!-- 位置评分区域 -->
  184. <view class="right_item">
  185. <view class="item_info">位置 {{ scoreWz }}</view>
  186. <view class="item_progress">
  187. <progress activeColor="#0BAD8B" backgroundColor="#CCCCCC" stroke-width="10" border-radius="92" :percent="((scoreWz * 1) / 5) * 100" />
  188. </view>
  189. </view>
  190. <!-- 设施评分区域 -->
  191. <view class="right_item">
  192. <view class="item_info">设施 {{ scoreSs }}</view>
  193. <view class="item_progress">
  194. <progress activeColor="#0BAD8B" backgroundColor="#CCCCCC" stroke-width="10" border-radius="92" :percent="((scoreSs * 1) / 5) * 100" />
  195. </view>
  196. </view>
  197. <!-- 服务评分区域 -->
  198. <view class="right_item">
  199. <view class="item_info">服务 {{ scoreFw }}</view>
  200. <view class="item_progress">
  201. <progress activeColor="#0BAD8B" backgroundColor="#CCCCCC" stroke-width="10" border-radius="92" :percent="((scoreFw * 1) / 5) * 100" />
  202. </view>
  203. </view>
  204. <!-- 卫生评分区域 -->
  205. <view class="right_item">
  206. <view class="item_info">卫生 {{ scoreWs }}</view>
  207. <view class="item_progress">
  208. <progress activeColor="#0BAD8B" backgroundColor="#CCCCCC" stroke-width="10" border-radius="92" :percent="((scoreWs * 1) / 5) * 100" />
  209. </view>
  210. </view>
  211. </view>
  212. </view>
  213. </view>
  214. <!-- 每一个评价区域 -->
  215. <view class="evaluate_box" v-for="item in commentList" :key="item.id" @click="handleGoDetail(item)">
  216. <!-- 用户信息区域 -->
  217. <view class="box_userInfo">
  218. <img mode="aspectFill" :src="item.headPhoto" />
  219. <view class="userInfo_msg">
  220. <view class="msg_name">{{ item.userName }}</view>
  221. <view class="msg_star">
  222. <uni-rate readonly activeColor="#FFC300" :size="16" :value="item.score" />
  223. </view>
  224. </view>
  225. </view>
  226. <!-- 入住时间区域 -->
  227. <view class="box_time">{{ item.liveTime.slice(0, 10) }}入住,{{ item.commentTime.slice(0, 10) }}发表 | {{ item.houseName }}</view>
  228. <!-- 评价内容区域 -->
  229. <uv-read-more show-height="85rpx" closeText="全文" color="#096663" fontSize="24rpx" textIndent="0" :toggle="true" :shadowStyle="shadowStyle">
  230. <view class="box_content">
  231. {{ item.content }}
  232. </view>
  233. </uv-read-more>
  234. <!-- 图片区域 -->
  235. <view class="box_img">
  236. <img v-for="(ele, index) in item.url" :key="index" mode="aspectFill" :src="ele" @click.stop="handleClickImg(item.url, index)" />
  237. </view>
  238. </view>
  239. <view class="foot" @click="handleGoPage" v-if="commentList.length">
  240. 查看全部{{ total }}条评价
  241. <img src="../../static/index/right.png" />
  242. </view>
  243. <view class="noData" v-if="commentList.length === 0">
  244. <img src="../../static/images/noData.png" />
  245. 暂无评论
  246. </view>
  247. </view>
  248. </view>
  249. </view>
  250. </template>
  251. <script>
  252. export default {
  253. data() {
  254. return {
  255. // 滚动穿透控制
  256. showPage: false,
  257. // 房型数据数组
  258. list: [],
  259. // 住几晚
  260. nightNum: 1,
  261. // 选择日期数组
  262. dayList: [],
  263. // 酒店信息
  264. info: null,
  265. // 房间信息
  266. roomInfo: {},
  267. // 民宿Id
  268. hotelId: '',
  269. // 是否有定位权限
  270. showLocation: false,
  271. // 是否展示距离
  272. distance: '',
  273. // 入住时间 YYYY-MM-DD
  274. startTime: '',
  275. // 离店时间 YYYY-MM-DD
  276. endTime: '',
  277. // 日历可以选择的最早日期
  278. earlyTime: '',
  279. // 日历可以选择的最晚日期
  280. lateTime: '',
  281. activeIndex: 0,
  282. headerList: ['预定', '评价'],
  283. // 评价列表数据
  284. commentList: [],
  285. queryDom: null,
  286. domTop: null,
  287. selected: [],
  288. // 总评分
  289. score: '',
  290. // 服务评分
  291. scoreFw: '',
  292. // 设施评分
  293. scoreSs: '',
  294. // 卫生评分
  295. scoreWs: '',
  296. // 位置评分
  297. scoreWz: '',
  298. // 评论总条数
  299. total: null,
  300. // 是否收藏
  301. ischecked: false
  302. }
  303. },
  304. onLoad(options) {
  305. this.getTimes()
  306. this.hotelId = options.id
  307. this.distance = options.distance === 'undefined' ? false : options.distance
  308. uni.getSetting({
  309. success: (res) => {
  310. this.showLocation = res.authSetting['scope.userLocation']
  311. this.getHotelInfo()
  312. this.getEvaData()
  313. }
  314. })
  315. },
  316. onPageScroll(e) {
  317. if (!this.queryDom) {
  318. this.queryDom = uni.createSelectorQuery().in(this)
  319. this.queryDom
  320. .select('.evaluate')
  321. .boundingClientRect((data) => {
  322. this.domTop = data.top
  323. })
  324. .exec()
  325. }
  326. if (e.scrollTop > this.domTop) {
  327. this.activeIndex = 1
  328. } else {
  329. this.activeIndex = 0
  330. }
  331. },
  332. methods: {
  333. // 点击收藏按钮回调
  334. async changeCollect(is_collect_hotel) {
  335. const res = await this.$myRequest({
  336. url: is_collect_hotel ? '/mhotel/ahpdelCollectHotel.action' : '/mhotel/ahpcollectHotel.action',
  337. data: {
  338. userId: uni.getStorageSync('userInfo').id,
  339. hotelId: this.hotelId
  340. }
  341. })
  342. // console.log(res)
  343. if (res.code === 200) {
  344. uni.showToast({
  345. title: is_collect_hotel ? '取消收藏成功' : '收藏成功',
  346. icon: 'success',
  347. mask: true
  348. })
  349. this.info.is_collect_hotel = !this.info.is_collect_hotel
  350. }
  351. },
  352. // 获取评论数据
  353. async getEvaData() {
  354. const res = await this.$myRequest({
  355. url: '/mhotel/abcaevaluatePage.action',
  356. data: {
  357. hotelId: this.hotelId,
  358. page: 1,
  359. rows: 5,
  360. status: 0
  361. }
  362. })
  363. // console.log(res);
  364. if (res.code === 200 && res.page.pageList) {
  365. this.score = res.score.score.toFixed(1)
  366. this.scoreFw = res.score.scoreFw.toFixed(1)
  367. this.scoreSs = res.score.scoreSs.toFixed(1)
  368. this.scoreWs = res.score.scoreWs.toFixed(1)
  369. this.scoreWz = res.score.scoreWz.toFixed(1)
  370. this.commentList = res.page.pageList
  371. this.total = res.page.total
  372. }
  373. },
  374. // 获取民宿信息
  375. async getHotelInfo() {
  376. const res = await this.$myRequest({
  377. url: '/mhotel/ahpgetHouseByHotelId.action',
  378. data: {
  379. hotelId: this.hotelId,
  380. userId: uni.getStorageSync('userInfo').id,
  381. queryStartTime: this.startTime,
  382. queryEndTime: this.endTime
  383. }
  384. })
  385. // console.log(res)
  386. if (res.code === 200) {
  387. this.info = res.data.data
  388. this.list = res.data.data.houseList
  389. uni.setNavigationBarTitle({
  390. title: res.data.data.hotel_name
  391. })
  392. }
  393. },
  394. onClickItem(e) {
  395. this.activeIndex = e.currentIndex
  396. if (this.activeIndex === 1) {
  397. uni.pageScrollTo({
  398. selector: '.evaluate'
  399. })
  400. } else {
  401. uni.pageScrollTo({
  402. scrollTop: 0
  403. })
  404. }
  405. },
  406. monthSwitch(e) {
  407. let time = e.year + '-' + e.month.toString().padStart(2, 0) + '-01'
  408. this.handleOpen(time)
  409. },
  410. // 选择日期确定回调
  411. handleConfirm(e) {
  412. this.startTime = e.range.before
  413. this.endTime = e.range.after
  414. this.dayList = e.range.data
  415. this.nightNum = e.range.data.length - 1
  416. this.getHotelInfo()
  417. },
  418. // 点击地图图标回调
  419. handleMap(item) {
  420. if (this.showLocation) {
  421. let lat = item.hpositionWens.split(',')[0] * 1
  422. let lng = item.hpositionWens.split(',')[1] * 1
  423. uni.openLocation({
  424. latitude: lat,
  425. longitude: lng,
  426. name: item.hname,
  427. address: item.hposition,
  428. success: () => {}
  429. })
  430. } else {
  431. uni.showModal({
  432. content: '当前没有定位权限,是否去设置打开?',
  433. confirmText: '确认',
  434. cancelText: '取消',
  435. success: (res) => {
  436. if (res.confirm) {
  437. uni.openSetting({
  438. success: (res) => {
  439. this.showLocation = true
  440. this.handleMap(item)
  441. }
  442. })
  443. } else {
  444. uni.showToast({
  445. title: '获取定位权限失败,无法使用地图功能',
  446. icon: 'none',
  447. mask: true
  448. })
  449. }
  450. }
  451. })
  452. }
  453. },
  454. // 点击电话图标回调
  455. handlePhone(phone) {
  456. uni.makePhoneCall({
  457. phoneNumber: phone
  458. })
  459. },
  460. // 点击弹窗关闭图标回调
  461. handleClosePop() {
  462. this.showPage = false
  463. this.$refs.popup.close()
  464. },
  465. // 点击每一个户型回调
  466. handleLookDetail(item) {
  467. this.roomInfo = item
  468. this.showPage = true
  469. this.$refs.popup.open('bottom')
  470. },
  471. // 点击设施详情回调
  472. goPageDetailInfo() {
  473. uni.navigateTo({
  474. url: `/pages/detailInfo/detailInfo?hotelId=${this.hotelId}`
  475. })
  476. },
  477. // 点击 订 预定 按钮回调
  478. goPageAffOrder(item) {
  479. let flag = uni.getStorageSync('openid')
  480. if (flag) {
  481. if (!this.startTime) {
  482. uni.showToast({
  483. title: '请选择入住时间',
  484. icon: 'none'
  485. })
  486. return
  487. }
  488. if (!this.endTime) {
  489. uni.showToast({
  490. title: '请选择离店时间',
  491. icon: 'none'
  492. })
  493. return
  494. }
  495. if (item.remainRooms * 1 > 0) {
  496. this.$refs.popup.close()
  497. this.showPage = false
  498. let info = JSON.stringify({
  499. nightNum: this.nightNum,
  500. startTimeDay: this.startTime.slice(8, 10),
  501. startTimeMonth: this.startTime.slice(5, 7),
  502. startTimeWeek: this.getWeek(this.startTime),
  503. endTimeDay: this.endTime.slice(8, 10),
  504. endTimeMonth: this.endTime.slice(5, 7),
  505. endTimeWeek: this.getWeek(this.endTime),
  506. item: item,
  507. queryStartTime: this.startTime,
  508. queryEndTime: this.endTime,
  509. dayList: this.dayList,
  510. hTypeName: this.info.hTypeName,
  511. hotelName: this.info.hotel_name,
  512. hotelId: this.hotelId
  513. })
  514. uni.navigateTo({
  515. url: `/pages/affirmOrder/affirmOrder?info=${info}`
  516. })
  517. } else {
  518. uni.showToast({
  519. title: '该房间已售罄',
  520. icon: 'none',
  521. mask: true
  522. })
  523. }
  524. } else {
  525. uni.showToast({
  526. title: '请先登录',
  527. icon: 'none',
  528. mask: true
  529. })
  530. setTimeout(() => {
  531. uni.navigateTo({
  532. url: '/pages/login/login'
  533. })
  534. }, 1500)
  535. }
  536. },
  537. // 点击日期区域回调
  538. async handleOpen(time) {
  539. const res = await this.$myRequest({
  540. url: '/mhotel/house/price/priceCalendar.action',
  541. data: {
  542. merchantId: this.info.managerId,
  543. startTime: time ? time : this.startTime
  544. }
  545. })
  546. if (res.code === 200) {
  547. this.selected = res.data
  548. }
  549. if (!time) {
  550. this.$refs.calendar.open()
  551. }
  552. },
  553. // 传入参数获取当前是星期几
  554. getWeek(time) {
  555. let date = new Date(time)
  556. let week = date.getDay()
  557. let weekList = ['日', '一', '二', '三', '四', '五', '六']
  558. let res = '周' + weekList[week]
  559. return res
  560. },
  561. // 获取今明两天的日期 YYYY-MM-DD
  562. getTimes() {
  563. // 今天
  564. let today = new Date()
  565. // 明天
  566. let tomorrow = new Date(today.getTime() + 24 * 60 * 60 * 1000)
  567. let late = new Date(today.getTime() + 24 * 60 * 60 * 1000 * 14)
  568. this.startTime = `${today.getFullYear()}-${(today.getMonth() + 1).toString().padStart(2, 0)}-${today.getDate().toString().padStart(2, 0)}`
  569. this.endTime = `${tomorrow.getFullYear()}-${(tomorrow.getMonth() + 1).toString().padStart(2, 0)}-${tomorrow.getDate().toString().padStart(2, 0)}`
  570. this.dayList = [this.startTime, this.endTime]
  571. this.earlyTime = this.startTime
  572. this.lateTime = `${late.getFullYear()}-${(late.getMonth() + 1).toString().padStart(2, 0)}-${late.getDate().toString().padStart(2, 0)}`
  573. },
  574. handleGoPull(linkProUrl) {
  575. let temURL = linkProUrl.slice(22)
  576. let url = 'https://f10mfe54bri.720yun.com' + temURL
  577. uni.navigateTo({
  578. url: `/pages/web/web?url=${url}`
  579. })
  580. },
  581. // 点击每一个评价回调
  582. handleGoDetail(item) {
  583. uni.navigateTo({
  584. url: `/pages/appraiseDetail/appraiseDetail?id=${item.id}`
  585. })
  586. },
  587. // 点击评价图片回调
  588. handleClickImg(url, index) {
  589. // 预览图片
  590. uni.previewImage({
  591. current: index,
  592. urls: url
  593. })
  594. },
  595. handleGoPage() {
  596. uni.navigateTo({
  597. url: `/pages/appraise/appraise?hotelId=${this.hotelId}`
  598. })
  599. }
  600. }
  601. }
  602. </script>
  603. <style lang="scss" scoped>
  604. .container {
  605. display: flex;
  606. flex-direction: column;
  607. align-items: center;
  608. position: relative;
  609. min-height: 100vh;
  610. background-color: #f2f3f5;
  611. .control {
  612. z-index: 999;
  613. position: sticky;
  614. top: 0;
  615. width: 100%;
  616. height: 100rpx;
  617. background-color: #fff;
  618. }
  619. .banner {
  620. position: relative;
  621. width: 750rpx;
  622. height: 422rpx;
  623. .swiper {
  624. height: 422rpx;
  625. .swiper_item {
  626. width: 100%;
  627. height: 100%;
  628. .img {
  629. width: 100%;
  630. height: 100%;
  631. }
  632. }
  633. }
  634. .img {
  635. width: 100%;
  636. height: 100%;
  637. }
  638. .slogan {
  639. position: absolute;
  640. top: 0;
  641. left: 0;
  642. display: flex;
  643. justify-content: center;
  644. align-items: center;
  645. width: 163rpx;
  646. height: 60rpx;
  647. background-color: rgba(255, 255, 255, 0.4);
  648. img {
  649. width: 125rpx;
  650. height: 44rpx;
  651. }
  652. }
  653. .full {
  654. position: absolute;
  655. top: 13rpx;
  656. right: 20rpx;
  657. display: flex;
  658. align-items: center;
  659. justify-content: space-around;
  660. width: 173rpx;
  661. height: 60rpx;
  662. color: #fff;
  663. font-size: 24rpx;
  664. border-radius: 11rpx;
  665. background-color: rgba(0, 0, 0, 0.5);
  666. img {
  667. width: 40rpx;
  668. height: 40rpx;
  669. }
  670. }
  671. .collect {
  672. position: absolute;
  673. top: 68rpx;
  674. left: 8rpx;
  675. }
  676. }
  677. .detail {
  678. z-index: 1;
  679. float: left;
  680. margin-top: -177rpx;
  681. box-sizing: border-box;
  682. padding: 0 30rpx 30rpx;
  683. width: 710rpx;
  684. border-radius: 10rpx;
  685. background-color: #fff;
  686. .detail_name {
  687. margin-top: 25rpx;
  688. font-size: 34rpx;
  689. font-weight: bold;
  690. }
  691. .detail_info {
  692. display: flex;
  693. justify-content: space-between;
  694. margin-top: 10rpx;
  695. .info_left {
  696. color: #999999;
  697. font-size: 20rpx;
  698. }
  699. .info_right {
  700. display: flex;
  701. align-items: center;
  702. color: #096562;
  703. font-size: 24rpx;
  704. img {
  705. margin-left: 6rpx;
  706. width: 10rpx;
  707. height: 20rpx;
  708. }
  709. }
  710. }
  711. .detail_group {
  712. display: flex;
  713. flex-wrap: wrap;
  714. margin-top: 5rpx;
  715. width: 450rpx;
  716. .group_item {
  717. display: flex;
  718. align-items: center;
  719. margin-right: 10rpx;
  720. margin-bottom: 10rpx;
  721. color: #999999;
  722. font-size: 20rpx;
  723. img {
  724. margin-right: 5rpx;
  725. width: 22rpx;
  726. height: 22rpx;
  727. }
  728. }
  729. }
  730. .address {
  731. display: flex;
  732. justify-content: space-between;
  733. margin-top: 8rpx;
  734. font-size: 28rpx;
  735. font-weight: bold;
  736. .address_left {
  737. width: 480rpx;
  738. overflow: hidden;
  739. text-overflow: ellipsis;
  740. white-space: nowrap;
  741. }
  742. .address_right {
  743. display: flex;
  744. .right_box {
  745. margin-left: 28rpx;
  746. width: 50rpx;
  747. height: 78rpx;
  748. img {
  749. width: 100%;
  750. height: 100%;
  751. }
  752. }
  753. }
  754. }
  755. .distance {
  756. margin-top: -35rpx;
  757. color: #999999;
  758. font-size: 24rpx;
  759. }
  760. }
  761. .body {
  762. float: left;
  763. margin-top: 20rpx;
  764. // padding-bottom: 30rpx;
  765. width: 710rpx;
  766. border-radius: 10rpx;
  767. background-color: #fff;
  768. .body_header {
  769. display: flex;
  770. justify-content: space-around;
  771. box-sizing: border-box;
  772. padding: 0 30rpx;
  773. height: 150rpx;
  774. .header_start {
  775. display: flex;
  776. flex-direction: column;
  777. justify-content: center;
  778. align-items: center;
  779. width: 213rpx;
  780. height: 150rpx;
  781. font-size: 30rpx;
  782. .header_top {
  783. margin-bottom: 10rpx;
  784. color: #999999;
  785. font-size: 24rpx;
  786. }
  787. .header_bottom {
  788. font-size: 34rpx;
  789. font-weight: bold;
  790. }
  791. }
  792. .header_night {
  793. display: flex;
  794. justify-content: center;
  795. align-items: center;
  796. .night_line {
  797. width: 17rpx;
  798. height: 1rpx;
  799. background-color: #296de3;
  800. }
  801. .night_box {
  802. display: flex;
  803. align-items: center;
  804. justify-content: center;
  805. width: 81rpx;
  806. height: 46rpx;
  807. font-size: 24rpx;
  808. border-radius: 66rpx;
  809. border: 1rpx solid #296de3;
  810. }
  811. }
  812. .header_end {
  813. display: flex;
  814. flex-direction: column;
  815. justify-content: center;
  816. align-items: center;
  817. width: 213rpx;
  818. height: 150rpx;
  819. font-size: 30rpx;
  820. .header_top {
  821. margin-bottom: 10rpx;
  822. color: #999999;
  823. font-size: 24rpx;
  824. }
  825. .header_bottom {
  826. font-size: 34rpx;
  827. font-weight: bold;
  828. }
  829. }
  830. }
  831. .body_content {
  832. .body_box {
  833. box-sizing: border-box;
  834. padding: 0 30rpx;
  835. margin-bottom: 30rpx;
  836. display: flex;
  837. height: 193rpx;
  838. border-bottom: 1rpx solid #cccccc;
  839. .box_left {
  840. width: 213rpx;
  841. height: 161rpx;
  842. border-radius: 5rpx;
  843. img {
  844. width: 100%;
  845. height: 100%;
  846. }
  847. }
  848. .box_center {
  849. margin-left: 16rpx;
  850. .center_top {
  851. font-size: 34rpx;
  852. font-weight: bold;
  853. }
  854. .center_center {
  855. display: flex;
  856. flex-wrap: wrap;
  857. margin-top: 10rpx;
  858. color: #999999;
  859. font-size: 24rpx;
  860. .center_item {
  861. margin-right: 15rpx;
  862. }
  863. }
  864. .center_bottom {
  865. margin-top: 25rpx;
  866. .img {
  867. margin-right: 15rpx;
  868. width: 30rpx;
  869. height: 30rpx;
  870. }
  871. }
  872. }
  873. .box_right {
  874. display: flex;
  875. flex-direction: column;
  876. align-items: flex-end;
  877. margin-left: auto;
  878. margin-top: 20rpx;
  879. .right_price {
  880. color: #ff5733;
  881. font-size: 42rpx;
  882. text {
  883. font-size: 24rpx;
  884. }
  885. }
  886. .right_btn {
  887. display: flex;
  888. justify-content: center;
  889. align-items: center;
  890. margin-top: 10rpx;
  891. width: 100rpx;
  892. height: 66rpx;
  893. color: #fff;
  894. font-size: 36rpx;
  895. border-radius: 11rpx;
  896. background-color: #096562;
  897. }
  898. .inactive {
  899. background-color: #cccccc;
  900. }
  901. }
  902. }
  903. .body_pop {
  904. position: relative;
  905. height: 955rpx;
  906. border-radius: 22rpx 22rpx 0 0;
  907. background-color: #fff;
  908. overflow-y: auto;
  909. .pop_swiper {
  910. height: 422rpx;
  911. border-radius: 22rpx 22rpx 0 0;
  912. .pop_swiper_item {
  913. width: 100%;
  914. height: 100%;
  915. .img {
  916. width: 100%;
  917. height: 100%;
  918. border-radius: 22rpx 22rpx 0 0;
  919. }
  920. }
  921. }
  922. .pop_icon {
  923. position: absolute;
  924. top: 20rpx;
  925. right: 30rpx;
  926. width: 58rpx;
  927. height: 58rpx;
  928. }
  929. .pop_body {
  930. box-sizing: border-box;
  931. padding: 0 20rpx 30rpx;
  932. .body_title {
  933. margin-top: 30rpx;
  934. font-size: 32rpx;
  935. font-weight: bold;
  936. }
  937. .body_tags {
  938. display: flex;
  939. flex-wrap: wrap;
  940. margin-top: 20rpx;
  941. .tags_item {
  942. display: flex;
  943. align-items: center;
  944. margin-right: 76rpx;
  945. margin-bottom: 20rpx;
  946. color: #383838;
  947. font-size: 24rpx;
  948. .img {
  949. margin-right: 5rpx;
  950. width: 28rpx;
  951. height: 28rpx;
  952. }
  953. }
  954. }
  955. .body_title2 {
  956. margin-top: 20rpx;
  957. font-size: 28rpx;
  958. }
  959. .body_detail {
  960. display: flex;
  961. flex-direction: column;
  962. justify-content: space-between;
  963. // align-items: flex-end;
  964. box-sizing: border-box;
  965. padding: 20rpx 30rpx;
  966. margin-top: 18rpx;
  967. width: 710rpx;
  968. height: 266rpx;
  969. font-size: 24rpx;
  970. border-radius: 7rpx;
  971. background-color: #f2f2f2;
  972. .detail_old {
  973. text-align: end;
  974. text-decoration: line-through;
  975. }
  976. .detail_box {
  977. display: flex;
  978. justify-content: space-between;
  979. color: #808080;
  980. text {
  981. color: #ff5733;
  982. }
  983. }
  984. .detail_new {
  985. display: flex;
  986. justify-content: flex-end;
  987. align-items: center;
  988. font-size: 24rpx;
  989. .color {
  990. color: #ff5733;
  991. }
  992. .price {
  993. font-size: 36rpx;
  994. }
  995. .ml_10 {
  996. margin-left: 10rpx;
  997. }
  998. }
  999. }
  1000. .body_bottom {
  1001. display: flex;
  1002. justify-content: space-between;
  1003. align-items: center;
  1004. margin-top: 250rpx;
  1005. height: 80rpx;
  1006. .bottom_left {
  1007. display: flex;
  1008. align-items: center;
  1009. color: #333333;
  1010. font-size: 24rpx;
  1011. .img {
  1012. margin-right: 10rpx;
  1013. width: 48rpx;
  1014. height: 48rpx;
  1015. }
  1016. }
  1017. .bottom_right {
  1018. display: flex;
  1019. align-items: center;
  1020. color: #ff5733;
  1021. font-size: 40rpx;
  1022. font-weight: bold;
  1023. text {
  1024. font-size: 24rpx;
  1025. }
  1026. .btn {
  1027. display: flex;
  1028. justify-content: center;
  1029. align-items: center;
  1030. margin-left: 30rpx;
  1031. width: 238rpx;
  1032. height: 80rpx;
  1033. color: #fff;
  1034. font-size: 32rpx;
  1035. font-weight: 400;
  1036. border-radius: 64rpx;
  1037. background-color: #096562;
  1038. }
  1039. .inactive {
  1040. background-color: #cccccc;
  1041. }
  1042. }
  1043. }
  1044. }
  1045. }
  1046. }
  1047. .noData {
  1048. display: flex;
  1049. flex-direction: column;
  1050. justify-content: center;
  1051. align-items: center;
  1052. padding-bottom: 20rpx;
  1053. img {
  1054. margin-top: 60rpx;
  1055. width: 600rpx;
  1056. height: 600rpx;
  1057. }
  1058. }
  1059. }
  1060. .evaluate {
  1061. width: 710rpx;
  1062. background-color: #f2f3f5;
  1063. .evaluate_title {
  1064. line-height: 83rpx;
  1065. font-size: 32rpx;
  1066. font-weight: bold;
  1067. }
  1068. .evaluate_body {
  1069. display: flex;
  1070. flex-direction: column;
  1071. margin-bottom: 20rpx;
  1072. width: 710rpx;
  1073. border-radius: 11rpx;
  1074. background-color: #fff;
  1075. .header {
  1076. display: flex;
  1077. align-items: center;
  1078. margin: 25rpx 20rpx;
  1079. width: 670rpx;
  1080. height: 120rpx;
  1081. border-radius: 13rpx;
  1082. background-color: #e4f0ef;
  1083. .header_box {
  1084. display: flex;
  1085. height: 70rpx;
  1086. .box_left {
  1087. display: flex;
  1088. justify-content: center;
  1089. align-items: center;
  1090. width: 140rpx;
  1091. color: #096562;
  1092. font-size: 60rpx;
  1093. font-weight: 900;
  1094. border-right: 1rpx solid #cccccc;
  1095. }
  1096. .box_right {
  1097. flex: 1;
  1098. display: flex;
  1099. flex-wrap: wrap;
  1100. color: #808080;
  1101. font-size: 24rpx;
  1102. .right_item {
  1103. display: flex;
  1104. align-items: center;
  1105. width: 50%;
  1106. .item_info {
  1107. margin-left: 33rpx;
  1108. }
  1109. .item_progress {
  1110. margin-right: 20rpx;
  1111. padding: 0 13rpx;
  1112. flex: 1;
  1113. }
  1114. }
  1115. }
  1116. }
  1117. }
  1118. .evaluate_box {
  1119. box-sizing: border-box;
  1120. padding: 0 20rpx;
  1121. margin: 0 auto 20rpx;
  1122. width: 710rpx;
  1123. border-radius: 18rpx;
  1124. background-color: #fff;
  1125. .box_userInfo {
  1126. display: flex;
  1127. align-items: center;
  1128. height: 115rpx;
  1129. img {
  1130. width: 70rpx;
  1131. height: 70rpx;
  1132. border-radius: 50%;
  1133. }
  1134. .userInfo_msg {
  1135. margin-left: 18rpx;
  1136. .msg_name {
  1137. font-size: 28rpx;
  1138. }
  1139. .msg_star {
  1140. margin-left: -5rpx;
  1141. margin-top: 5rpx;
  1142. }
  1143. }
  1144. }
  1145. .box_time {
  1146. display: flex;
  1147. align-items: center;
  1148. color: #a6a6a6;
  1149. font-size: 24rpx;
  1150. }
  1151. .box_content {
  1152. margin-top: 15rpx;
  1153. font-size: 24rpx;
  1154. color: #000;
  1155. }
  1156. .box_img {
  1157. display: grid;
  1158. grid-template-columns: 1fr 1fr 1fr;
  1159. grid-auto-rows: auto;
  1160. gap: 10rpx;
  1161. margin-top: 20rpx;
  1162. img {
  1163. width: 216rpx;
  1164. height: 216rpx;
  1165. border-radius: 20rpx;
  1166. }
  1167. }
  1168. }
  1169. .foot {
  1170. display: flex;
  1171. justify-content: center;
  1172. align-items: center;
  1173. padding-bottom: 20rpx;
  1174. height: 68rpx;
  1175. font-size: 24rpx;
  1176. font-weight: bold;
  1177. color: #096663;
  1178. img {
  1179. margin-left: 10rpx;
  1180. width: 10rpx;
  1181. height: 18rpx;
  1182. }
  1183. }
  1184. .noData {
  1185. display: flex;
  1186. flex-direction: column;
  1187. justify-content: center;
  1188. align-items: center;
  1189. padding-bottom: 60rpx;
  1190. img {
  1191. margin-top: 160rpx;
  1192. width: 600rpx;
  1193. height: 600rpx;
  1194. }
  1195. }
  1196. }
  1197. }
  1198. }
  1199. </style>