浏览代码

opt:选择房间类型页面中默认显示时间选择器

LiChengjin 1 月之前
父节点
当前提交
c816ad9634
共有 1 个文件被更改,包括 5 次插入3 次删除
  1. 5 3
      subpkg_checkin/selectRoomType/selectRoomType.vue

+ 5 - 3
subpkg_checkin/selectRoomType/selectRoomType.vue

@@ -68,7 +68,7 @@
 		data() {
 			return {
 				roomTypeList: {},
-				showCalendar: false,
+				showCalendar: true,
 				defaultDate: [],
 				arrowPicPath: '/static/arrow.png',
 				startDate: '',
@@ -86,7 +86,8 @@
 				//根据起始时间到第二天的边界时间来算天数
 				let checkinBoundaryTimeSet = this.currentHotel.checkinBoundaryTime
 				let end = new Date(this.endDate)
-				let endTime = checkinBoundaryTimeSet ? this.currentHotel.checkinBoundaryTime.split(":") : "06:00:00".split(":")
+				let endTime = checkinBoundaryTimeSet ? this.currentHotel.checkinBoundaryTime.split(":") : "06:00:00".split(
+					":")
 				end.setHours(endTime[0], endTime[1], endTime[2])
 				let num = ((new Date(end)).valueOf() - (new Date(this.startDate)).valueOf()) / (24 * 60 * 60 *
 					1000)
@@ -140,7 +141,8 @@
 			this.startDay = getDay(new Date().getDay())
 			//入住时间早于边界时间,默认当天结束
 			//入住时间晚于边界时间,默认第二天结束
-			let checkinBoundaryTime = this.currentHotel.checkinBoundaryTime ? this.currentHotel.checkinBoundaryTime : "06:00:00"
+			let checkinBoundaryTime = this.currentHotel.checkinBoundaryTime ? this.currentHotel.checkinBoundaryTime :
+				"06:00:00"
 			let boundaryTime = new Date(
 				now.getFullYear() + '/' + (now.getMonth() + 1) + '/' + now.getDate() +
 				' ' + checkinBoundaryTime)