detail.vue 31 KB

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