detail.vue 30 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970717273747576777879808182838485868788899091929394959697989910010110210310410510610710810911011111211311411511611711811912012112212312412512612712812913013113213313413513613713813914014114214314414514614714814915015115215315415515615715815916016116216316416516616716816917017117217317417517617717817918018118218318418518618718818919019119219319419519619719819920020120220320420520620720820921021121221321421521621721821922022122222322422522622722822923023123223323423523623723823924024124224324424524624724824925025125225325425525625725825926026126226326426526626726826927027127227327427527627727827928028128228328428528628728828929029129229329429529629729829930030130230330430530630730830931031131231331431531631731831932032132232332432532632732832933033133233333433533633733833934034134234334434534634734834935035135235335435535635735835936036136236336436536636736836937037137237337437537637737837938038138238338438538638738838939039139239339439539639739839940040140240340440540640740840941041141241341441541641741841942042142242342442542642742842943043143243343443543643743843944044144244344444544644744844945045145245345445545645745845946046146246346446546646746846947047147247347447547647747847948048148248348448548648748848949049149249349449549649749849950050150250350450550650750850951051151251351451551651751851952052152252352452552652752852953053153253353453553653753853954054154254354454554654754854955055155255355455555655755855956056156256356456556656756856957057157257357457557657757857958058158258358458558658758858959059159259359459559659759859960060160260360460560660760860961061161261361461561661761861962062162262362462562662762862963063163263363463563663763863964064164264364464564664764864965065165265365465565665765865966066166266366466566666766866967067167267367467567667767867968068168268368468568668768868969069169269369469569669769869970070170270370470570670770870971071171271371471571671771871972072172272372472572672772872973073173273373473573673773873974074174274374474574674774874975075175275375475575675775875976076176276376476576676776876977077177277377477577677777877978078178278378478578678778878979079179279379479579679779879980080180280380480580680780880981081181281381481581681781881982082182282382482582682782882983083183283383483583683783883984084184284384484584684784884985085185285385485585685785885986086186286386486586686786886987087187287387487587687787887988088188288388488588688788888989089189289389489589689789889990090190290390490590690790890991091191291391491591691791891992092192292392492592692792892993093193293393493593693793893994094194294394494594694794894995095195295395495595695795895996096196296396496596696796896997097197297397497597697797897998098198298398498598698798898999099199299399499599699799899910001001100210031004100510061007100810091010101110121013101410151016101710181019102010211022102310241025102610271028102910301031103210331034103510361037103810391040104110421043104410451046104710481049105010511052105310541055105610571058105910601061106210631064106510661067106810691070107110721073107410751076107710781079108010811082108310841085108610871088108910901091109210931094109510961097109810991100110111021103110411051106110711081109111011111112111311141115111611171118111911201121112211231124112511261127112811291130113111321133113411351136113711381139114011411142114311441145114611471148114911501151115211531154115511561157115811591160116111621163116411651166116711681169117011711172117311741175117611771178117911801181118211831184118511861187118811891190119111921193119411951196119711981199120012011202120312041205120612071208120912101211121212131214121512161217121812191220122112221223122412251226122712281229123012311232123312341235123612371238123912401241124212431244124512461247124812491250125112521253125412551256125712581259126012611262126312641265126612671268126912701271127212731274127512761277127812791280128112821283128412851286128712881289129012911292129312941295129612971298
  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. }
  350. })
  351. },
  352. onPageScroll(e) {
  353. if (!this.queryDom) {
  354. this.queryDom = uni.createSelectorQuery().in(this)
  355. this.queryDom
  356. .select('.evaluate')
  357. .boundingClientRect((data) => {
  358. this.domTop = data.top
  359. })
  360. .exec()
  361. }
  362. if (e.scrollTop > this.domTop) {
  363. this.activeIndex = 1
  364. } else {
  365. this.activeIndex = 0
  366. }
  367. },
  368. methods: {
  369. async getHotelInfo() {
  370. const res = await this.$myRequest({
  371. url: '/mhotel/ahpgetHouseByHotelId.action',
  372. data: {
  373. hotelId: this.hotelId,
  374. queryStartTime: this.startTime,
  375. queryEndTime: this.endTime
  376. }
  377. })
  378. // console.log(res)
  379. if (res.code === 200) {
  380. this.info = res.data.data
  381. this.list = res.data.data.houseList
  382. uni.setNavigationBarTitle({
  383. title: res.data.data.hotel_name
  384. })
  385. }
  386. },
  387. onClickItem(e) {
  388. this.activeIndex = e.currentIndex
  389. if (this.activeIndex === 1) {
  390. uni.pageScrollTo({
  391. selector: '.evaluate'
  392. })
  393. } else {
  394. uni.pageScrollTo({
  395. scrollTop: 0
  396. })
  397. }
  398. },
  399. // 选择日期确定回调
  400. handleConfirm(e) {
  401. this.startTime = e.range.before
  402. this.endTime = e.range.after
  403. this.dayList = e.range.data
  404. this.nightNum = e.range.data.length - 1
  405. this.getHotelInfo()
  406. },
  407. // 点击地图图标回调
  408. handleMap(item) {
  409. if (this.showLocation) {
  410. let lat = item.hpositionWens.split(',')[0] * 1
  411. let lng = item.hpositionWens.split(',')[1] * 1
  412. uni.openLocation({
  413. latitude: lat,
  414. longitude: lng,
  415. name: item.hname,
  416. address: item.hposition,
  417. success: () => {}
  418. })
  419. } else {
  420. uni.showModal({
  421. content: '当前没有定位权限,是否去设置打开?',
  422. confirmText: '确认',
  423. cancelText: '取消',
  424. success: (res) => {
  425. if (res.confirm) {
  426. uni.openSetting({
  427. success: (res) => {
  428. this.showLocation = true
  429. this.handleMap(item)
  430. }
  431. })
  432. } else {
  433. uni.showToast({
  434. title: '获取定位权限失败,无法使用地图功能',
  435. icon: 'none',
  436. mask: true
  437. })
  438. }
  439. }
  440. })
  441. }
  442. },
  443. // 点击电话图标回调
  444. handlePhone(phone) {
  445. uni.makePhoneCall({
  446. phoneNumber: phone
  447. })
  448. },
  449. // 点击弹窗关闭图标回调
  450. handleClosePop() {
  451. this.showPage = false
  452. this.$refs.popup.close()
  453. },
  454. // 点击每一个户型回调
  455. handleLookDetail(item) {
  456. this.roomInfo = item
  457. this.showPage = true
  458. this.$refs.popup.open('bottom')
  459. },
  460. // 点击设施详情回调
  461. goPageDetailInfo() {
  462. uni.navigateTo({
  463. url: `/pages/detailInfo/detailInfo?hotelId=${this.hotelId}`
  464. })
  465. },
  466. // 点击 订 预定 按钮回调
  467. goPageAffOrder(item) {
  468. let flag = uni.getStorageSync('openid')
  469. if (flag) {
  470. if (!this.startTime) {
  471. uni.showToast({
  472. title: '请选择入住时间',
  473. icon: 'none'
  474. })
  475. return
  476. }
  477. if (!this.endTime) {
  478. uni.showToast({
  479. title: '请选择离店时间',
  480. icon: 'none'
  481. })
  482. return
  483. }
  484. if (item.remainRooms * 1 > 0) {
  485. this.$refs.popup.close()
  486. this.showPage = false
  487. let info = JSON.stringify({
  488. nightNum: this.nightNum,
  489. startTimeDay: this.startTime.slice(8, 10),
  490. startTimeMonth: this.startTime.slice(5, 7),
  491. startTimeWeek: this.getWeek(this.startTime),
  492. endTimeDay: this.endTime.slice(8, 10),
  493. endTimeMonth: this.endTime.slice(5, 7),
  494. endTimeWeek: this.getWeek(this.endTime),
  495. item: item,
  496. queryStartTime: this.startTime,
  497. queryEndTime: this.endTime,
  498. dayList: this.dayList,
  499. hTypeName: this.info.hTypeName,
  500. hotelName: this.info.hotel_name
  501. })
  502. uni.navigateTo({
  503. url: `/pages/affirmOrder/affirmOrder?info=${info}`
  504. })
  505. } else {
  506. uni.showToast({
  507. title: '该房间已售罄',
  508. icon: 'none',
  509. mask: true
  510. })
  511. }
  512. } else {
  513. uni.showToast({
  514. title: '请先登录',
  515. icon: 'none',
  516. mask: true
  517. })
  518. setTimeout(() => {
  519. uni.navigateTo({
  520. url: '/pages/login/login'
  521. })
  522. }, 1500)
  523. }
  524. },
  525. // 点击日期区域回调
  526. handleOpen() {
  527. this.$refs.calendar.open()
  528. },
  529. // 传入参数获取当前是星期几
  530. getWeek(time) {
  531. let date = new Date(time)
  532. let week = date.getDay()
  533. let weekList = ['日', '一', '二', '三', '四', '五', '六']
  534. let res = '周' + weekList[week]
  535. return res
  536. },
  537. // 获取今明两天的日期 YYYY-MM-DD
  538. getTimes() {
  539. // 今天
  540. let today = new Date()
  541. // 明天
  542. let tomorrow = new Date(today.getTime() + 24 * 60 * 60 * 1000)
  543. let late = new Date(today.getTime() + 24 * 60 * 60 * 1000 * 14)
  544. this.startTime = `${today.getFullYear()}-${(today.getMonth() + 1).toString().padStart(2, 0)}-${today.getDate().toString().padStart(2, 0)}`
  545. this.endTime = `${tomorrow.getFullYear()}-${(tomorrow.getMonth() + 1).toString().padStart(2, 0)}-${tomorrow.getDate().toString().padStart(2, 0)}`
  546. this.dayList = [this.startTime, this.endTime]
  547. this.earlyTime = this.startTime
  548. this.lateTime = `${late.getFullYear()}-${(late.getMonth() + 1).toString().padStart(2, 0)}-${late.getDate().toString().padStart(2, 0)}`
  549. },
  550. handleGoPull(linkProUrl) {
  551. let temURL = linkProUrl.slice(22)
  552. let url = 'https://f10mfe54bri.720yun.com' + temURL
  553. uni.navigateTo({
  554. url: `/pages/web/web?url=${url}`
  555. })
  556. },
  557. // 点击每一个评价回调
  558. handleGoDetail(item) {
  559. let info = encodeURIComponent(JSON.stringify(item))
  560. uni.navigateTo({
  561. url: `/pages/appraiseDetail/appraiseDetail?info=${info}`
  562. })
  563. },
  564. // 点击评价图片回调
  565. handleClickImg(url, index) {
  566. // 预览图片
  567. uni.previewImage({
  568. current: index,
  569. urls: url
  570. })
  571. },
  572. handleGoPage() {
  573. uni.navigateTo({
  574. url: '/pages/appraise/appraise'
  575. })
  576. }
  577. }
  578. }
  579. </script>
  580. <style lang="scss" scoped>
  581. .container {
  582. display: flex;
  583. flex-direction: column;
  584. align-items: center;
  585. position: relative;
  586. min-height: 100vh;
  587. background-color: #f2f3f5;
  588. .control {
  589. z-index: 999;
  590. position: sticky;
  591. top: 0;
  592. width: 100%;
  593. height: 100rpx;
  594. background-color: #fff;
  595. }
  596. .banner {
  597. position: relative;
  598. width: 750rpx;
  599. height: 422rpx;
  600. .swiper {
  601. height: 422rpx;
  602. .swiper_item {
  603. width: 100%;
  604. height: 100%;
  605. .img {
  606. width: 100%;
  607. height: 100%;
  608. }
  609. }
  610. }
  611. .img {
  612. width: 100%;
  613. height: 100%;
  614. }
  615. .slogan {
  616. position: absolute;
  617. top: 0;
  618. left: 0;
  619. display: flex;
  620. justify-content: center;
  621. align-items: center;
  622. width: 163rpx;
  623. height: 60rpx;
  624. background-color: rgba(255, 255, 255, 0.4);
  625. img {
  626. width: 125rpx;
  627. height: 44rpx;
  628. }
  629. }
  630. .full {
  631. position: absolute;
  632. top: 13rpx;
  633. right: 20rpx;
  634. display: flex;
  635. align-items: center;
  636. justify-content: space-around;
  637. width: 173rpx;
  638. height: 60rpx;
  639. color: #fff;
  640. font-size: 24rpx;
  641. border-radius: 11rpx;
  642. background-color: rgba(0, 0, 0, 0.5);
  643. img {
  644. width: 40rpx;
  645. height: 40rpx;
  646. }
  647. }
  648. }
  649. .detail {
  650. z-index: 1;
  651. float: left;
  652. margin-top: -177rpx;
  653. box-sizing: border-box;
  654. padding: 0 30rpx 30rpx;
  655. width: 710rpx;
  656. border-radius: 10rpx;
  657. background-color: #fff;
  658. .detail_name {
  659. margin-top: 25rpx;
  660. font-size: 34rpx;
  661. font-weight: bold;
  662. }
  663. .detail_info {
  664. display: flex;
  665. justify-content: space-between;
  666. margin-top: 10rpx;
  667. .info_left {
  668. color: #999999;
  669. font-size: 20rpx;
  670. }
  671. .info_right {
  672. display: flex;
  673. align-items: center;
  674. color: #096562;
  675. font-size: 24rpx;
  676. img {
  677. margin-left: 6rpx;
  678. width: 10rpx;
  679. height: 20rpx;
  680. }
  681. }
  682. }
  683. .detail_group {
  684. display: flex;
  685. flex-wrap: wrap;
  686. margin-top: 5rpx;
  687. width: 450rpx;
  688. .group_item {
  689. display: flex;
  690. align-items: center;
  691. margin-right: 10rpx;
  692. margin-bottom: 10rpx;
  693. color: #999999;
  694. font-size: 20rpx;
  695. img {
  696. margin-right: 5rpx;
  697. width: 22rpx;
  698. height: 22rpx;
  699. }
  700. }
  701. }
  702. .address {
  703. display: flex;
  704. justify-content: space-between;
  705. margin-top: 8rpx;
  706. font-size: 28rpx;
  707. font-weight: bold;
  708. .address_left {
  709. width: 480rpx;
  710. overflow: hidden;
  711. text-overflow: ellipsis;
  712. white-space: nowrap;
  713. }
  714. .address_right {
  715. display: flex;
  716. .right_box {
  717. margin-left: 28rpx;
  718. width: 50rpx;
  719. height: 78rpx;
  720. img {
  721. width: 100%;
  722. height: 100%;
  723. }
  724. }
  725. }
  726. }
  727. .distance {
  728. margin-top: -35rpx;
  729. color: #999999;
  730. font-size: 24rpx;
  731. }
  732. }
  733. .body {
  734. float: left;
  735. margin-top: 20rpx;
  736. // padding-bottom: 30rpx;
  737. width: 710rpx;
  738. border-radius: 10rpx;
  739. background-color: #fff;
  740. .body_header {
  741. display: flex;
  742. justify-content: space-around;
  743. box-sizing: border-box;
  744. padding: 0 30rpx;
  745. height: 150rpx;
  746. .header_start {
  747. display: flex;
  748. flex-direction: column;
  749. justify-content: center;
  750. align-items: center;
  751. width: 213rpx;
  752. height: 150rpx;
  753. font-size: 30rpx;
  754. .header_top {
  755. margin-bottom: 10rpx;
  756. color: #999999;
  757. font-size: 24rpx;
  758. }
  759. .header_bottom {
  760. font-size: 34rpx;
  761. font-weight: bold;
  762. }
  763. }
  764. .header_night {
  765. display: flex;
  766. justify-content: center;
  767. align-items: center;
  768. .night_line {
  769. width: 17rpx;
  770. height: 1rpx;
  771. background-color: #296de3;
  772. }
  773. .night_box {
  774. display: flex;
  775. align-items: center;
  776. justify-content: center;
  777. width: 81rpx;
  778. height: 46rpx;
  779. font-size: 24rpx;
  780. border-radius: 66rpx;
  781. border: 1rpx solid #296de3;
  782. }
  783. }
  784. .header_end {
  785. display: flex;
  786. flex-direction: column;
  787. justify-content: center;
  788. align-items: center;
  789. width: 213rpx;
  790. height: 150rpx;
  791. font-size: 30rpx;
  792. .header_top {
  793. margin-bottom: 10rpx;
  794. color: #999999;
  795. font-size: 24rpx;
  796. }
  797. .header_bottom {
  798. font-size: 34rpx;
  799. font-weight: bold;
  800. }
  801. }
  802. }
  803. .body_content {
  804. .body_box {
  805. box-sizing: border-box;
  806. padding: 0 30rpx;
  807. margin-bottom: 30rpx;
  808. display: flex;
  809. height: 193rpx;
  810. border-bottom: 1rpx solid #cccccc;
  811. .box_left {
  812. width: 213rpx;
  813. height: 161rpx;
  814. border-radius: 5rpx;
  815. img {
  816. width: 100%;
  817. height: 100%;
  818. }
  819. }
  820. .box_center {
  821. margin-left: 16rpx;
  822. .center_top {
  823. font-size: 34rpx;
  824. font-weight: bold;
  825. }
  826. .center_center {
  827. display: flex;
  828. flex-wrap: wrap;
  829. margin-top: 10rpx;
  830. color: #999999;
  831. font-size: 24rpx;
  832. .center_item {
  833. margin-right: 15rpx;
  834. }
  835. }
  836. .center_bottom {
  837. margin-top: 25rpx;
  838. .img {
  839. margin-right: 15rpx;
  840. width: 30rpx;
  841. height: 30rpx;
  842. }
  843. }
  844. }
  845. .box_right {
  846. display: flex;
  847. flex-direction: column;
  848. align-items: flex-end;
  849. margin-left: auto;
  850. margin-top: 20rpx;
  851. .right_price {
  852. color: #ff5733;
  853. font-size: 42rpx;
  854. text {
  855. font-size: 24rpx;
  856. }
  857. }
  858. .right_btn {
  859. display: flex;
  860. justify-content: center;
  861. align-items: center;
  862. margin-top: 10rpx;
  863. width: 100rpx;
  864. height: 66rpx;
  865. color: #fff;
  866. font-size: 36rpx;
  867. border-radius: 11rpx;
  868. background-color: #096562;
  869. }
  870. .inactive {
  871. background-color: #cccccc;
  872. }
  873. }
  874. }
  875. .body_pop {
  876. position: relative;
  877. height: 955rpx;
  878. border-radius: 22rpx 22rpx 0 0;
  879. background-color: #fff;
  880. overflow-y: auto;
  881. .pop_swiper {
  882. height: 422rpx;
  883. border-radius: 22rpx 22rpx 0 0;
  884. .pop_swiper_item {
  885. width: 100%;
  886. height: 100%;
  887. .img {
  888. width: 100%;
  889. height: 100%;
  890. border-radius: 22rpx 22rpx 0 0;
  891. }
  892. }
  893. }
  894. .pop_icon {
  895. position: absolute;
  896. top: 20rpx;
  897. right: 30rpx;
  898. width: 58rpx;
  899. height: 58rpx;
  900. }
  901. .pop_body {
  902. box-sizing: border-box;
  903. padding: 0 20rpx 30rpx;
  904. .body_title {
  905. margin-top: 30rpx;
  906. font-size: 32rpx;
  907. font-weight: bold;
  908. }
  909. .body_tags {
  910. display: flex;
  911. flex-wrap: wrap;
  912. margin-top: 20rpx;
  913. .tags_item {
  914. display: flex;
  915. align-items: center;
  916. margin-right: 76rpx;
  917. margin-bottom: 20rpx;
  918. color: #383838;
  919. font-size: 24rpx;
  920. .img {
  921. margin-right: 5rpx;
  922. width: 28rpx;
  923. height: 28rpx;
  924. }
  925. }
  926. }
  927. .body_title2 {
  928. margin-top: 20rpx;
  929. font-size: 28rpx;
  930. }
  931. .body_detail {
  932. display: flex;
  933. flex-direction: column;
  934. justify-content: space-between;
  935. // align-items: flex-end;
  936. box-sizing: border-box;
  937. padding: 20rpx 30rpx;
  938. margin-top: 18rpx;
  939. width: 710rpx;
  940. height: 266rpx;
  941. font-size: 24rpx;
  942. border-radius: 7rpx;
  943. background-color: #f2f2f2;
  944. .detail_old {
  945. text-align: end;
  946. text-decoration: line-through;
  947. }
  948. .detail_box {
  949. display: flex;
  950. justify-content: space-between;
  951. color: #808080;
  952. text {
  953. color: #ff5733;
  954. }
  955. }
  956. .detail_new {
  957. display: flex;
  958. justify-content: flex-end;
  959. align-items: center;
  960. font-size: 24rpx;
  961. .color {
  962. color: #ff5733;
  963. }
  964. .price {
  965. font-size: 36rpx;
  966. }
  967. .ml_10 {
  968. margin-left: 10rpx;
  969. }
  970. }
  971. }
  972. .body_bottom {
  973. display: flex;
  974. justify-content: space-between;
  975. align-items: center;
  976. margin-top: 250rpx;
  977. height: 80rpx;
  978. .bottom_left {
  979. display: flex;
  980. align-items: center;
  981. color: #333333;
  982. font-size: 24rpx;
  983. .img {
  984. margin-right: 10rpx;
  985. width: 48rpx;
  986. height: 48rpx;
  987. }
  988. }
  989. .bottom_right {
  990. display: flex;
  991. align-items: center;
  992. color: #ff5733;
  993. font-size: 40rpx;
  994. font-weight: bold;
  995. text {
  996. font-size: 24rpx;
  997. }
  998. .btn {
  999. display: flex;
  1000. justify-content: center;
  1001. align-items: center;
  1002. margin-left: 30rpx;
  1003. width: 238rpx;
  1004. height: 80rpx;
  1005. color: #fff;
  1006. font-size: 32rpx;
  1007. font-weight: 400;
  1008. border-radius: 64rpx;
  1009. background-color: #096562;
  1010. }
  1011. .inactive {
  1012. background-color: #cccccc;
  1013. }
  1014. }
  1015. }
  1016. }
  1017. }
  1018. }
  1019. .noData {
  1020. display: flex;
  1021. flex-direction: column;
  1022. justify-content: center;
  1023. align-items: center;
  1024. padding-bottom: 20rpx;
  1025. img {
  1026. margin-top: 60rpx;
  1027. width: 600rpx;
  1028. height: 600rpx;
  1029. }
  1030. }
  1031. }
  1032. .evaluate {
  1033. width: 710rpx;
  1034. background-color: #f2f3f5;
  1035. .evaluate_title {
  1036. line-height: 83rpx;
  1037. font-size: 32rpx;
  1038. font-weight: bold;
  1039. }
  1040. .evaluate_body {
  1041. display: flex;
  1042. flex-direction: column;
  1043. margin-bottom: 20rpx;
  1044. width: 710rpx;
  1045. border-radius: 11rpx;
  1046. background-color: #fff;
  1047. .header {
  1048. display: flex;
  1049. align-items: center;
  1050. margin: 25rpx 20rpx;
  1051. width: 670rpx;
  1052. height: 120rpx;
  1053. border-radius: 13rpx;
  1054. background-color: #e4f0ef;
  1055. .header_box {
  1056. display: flex;
  1057. height: 70rpx;
  1058. .box_left {
  1059. display: flex;
  1060. justify-content: center;
  1061. align-items: center;
  1062. width: 140rpx;
  1063. color: #096562;
  1064. font-size: 60rpx;
  1065. font-weight: 900;
  1066. border-right: 1rpx solid #cccccc;
  1067. }
  1068. .box_right {
  1069. flex: 1;
  1070. display: flex;
  1071. flex-wrap: wrap;
  1072. color: #808080;
  1073. font-size: 24rpx;
  1074. .right_item {
  1075. display: flex;
  1076. align-items: center;
  1077. width: 50%;
  1078. .item_info {
  1079. margin-left: 33rpx;
  1080. }
  1081. .item_progress {
  1082. margin-right: 20rpx;
  1083. padding: 0 13rpx;
  1084. flex: 1;
  1085. }
  1086. }
  1087. }
  1088. }
  1089. }
  1090. .evaluate_box {
  1091. box-sizing: border-box;
  1092. padding: 0 20rpx;
  1093. margin: 0 auto 20rpx;
  1094. width: 710rpx;
  1095. border-radius: 18rpx;
  1096. background-color: #fff;
  1097. .box_userInfo {
  1098. display: flex;
  1099. align-items: center;
  1100. height: 115rpx;
  1101. img {
  1102. width: 70rpx;
  1103. height: 70rpx;
  1104. border-radius: 50%;
  1105. }
  1106. .userInfo_msg {
  1107. margin-left: 18rpx;
  1108. .msg_name {
  1109. font-size: 28rpx;
  1110. }
  1111. .msg_star {
  1112. margin-left: -5rpx;
  1113. margin-top: 5rpx;
  1114. }
  1115. }
  1116. }
  1117. .box_time {
  1118. display: flex;
  1119. align-items: center;
  1120. color: #a6a6a6;
  1121. font-size: 24rpx;
  1122. }
  1123. .box_content {
  1124. margin-top: 15rpx;
  1125. font-size: 24rpx;
  1126. color: #000;
  1127. }
  1128. .box_img {
  1129. display: grid;
  1130. grid-template-columns: 1fr 1fr 1fr;
  1131. grid-auto-rows: auto;
  1132. gap: 10rpx;
  1133. margin-top: 20rpx;
  1134. img {
  1135. width: 216rpx;
  1136. height: 216rpx;
  1137. border-radius: 20rpx;
  1138. }
  1139. }
  1140. }
  1141. .foot {
  1142. display: flex;
  1143. justify-content: center;
  1144. align-items: center;
  1145. padding-bottom: 20rpx;
  1146. height: 68rpx;
  1147. font-size: 24rpx;
  1148. font-weight: bold;
  1149. color: #096663;
  1150. img {
  1151. margin-left: 10rpx;
  1152. width: 10rpx;
  1153. height: 18rpx;
  1154. }
  1155. }
  1156. .noData {
  1157. display: flex;
  1158. flex-direction: column;
  1159. justify-content: center;
  1160. align-items: center;
  1161. padding-bottom: 60rpx;
  1162. img {
  1163. margin-top: 160rpx;
  1164. width: 600rpx;
  1165. height: 600rpx;
  1166. }
  1167. }
  1168. }
  1169. }
  1170. }
  1171. </style>