5 次代碼提交 7dd930e0d1 ... b13a1faaa2

作者 SHA1 備註 提交日期
  LiChengjin b13a1faaa2 Merge remote-tracking branch 'origin/dev' into dev 2 月之前
  LiChengjin f9b2c9ebd3 opt:删除无用代码 2 月之前
  LiChengjin ccf2ecd01c bugfix:修复确认订单页面查询失败的问题 2 月之前
  LiChengjin 91f7c280cc opt:续住和退房页面下方统一增加提示 2 月之前
  LiChengjin dbe7dd948d opt:选择房间页面,无可用房间时增加提示 2 月之前

+ 0 - 1
pages/order/order.vue

@@ -123,7 +123,6 @@
 					uni.$showMsg('订单已过期,无法入住!')
 					return
 				}
-				let order = this.orderList[index]
 				this.updateOrder(this.orderList[index])
 				this.updateCheckinInfo([])
 				uni.navigateTo({

+ 16 - 9
subpkg/extend/extend.vue

@@ -69,8 +69,8 @@
 					</u-form-item>
 				</u-form>
 			</view>
-			<view v-if="fromExtend" class="extend-tip">
-				<u-text :text="extendTip" align="center"></u-text>
+			<view class="end-time-tip">
+				<u-text :text="endTimeTip" align="center"></u-text>
 			</view>
 			<view class="btn-area">
 				<button v-if="fromExtend == true" class="btn" hover-class="btn-hover" @click="showCalendar">续住</button>
@@ -130,7 +130,6 @@
 				endTimePickerShow: false,
 				maxDate: 0,
 				oldEndTime: '',
-				extendTip: '',
 				needAuthPay: false,
 				breakfastNum: 0,
 				orderId: '',
@@ -144,6 +143,15 @@
 			...mapState('m_business', ['currentHotel']),
 			breakfastNumText() {
 				return this.breakfastNum ? `含${this.breakfastNum}早` : '不含早'
+			},
+			endTimeTip() {
+				let text
+				if (this.fromExtend) {
+					text = '续住'
+				} else {
+					text = '退房'
+				}
+				return '请在 ' + this.currentHotel.checkoutTime + ' 前办理' + text + ',逾期请至前台办理'
 			}
 		},
 		methods: {
@@ -169,7 +177,7 @@
 						})
 					}, 1000)
 				} else {
-					uni.$showMsg('退房办理失败')
+					uni.$showMsg('退房失败,请至前台办理')
 				}
 			},
 			async queryCanExtend() {
@@ -407,11 +415,10 @@
 		},
 		async onLoad(options) {
 			await this.getCheckinInfo()
-			await this.queryCanExtend()
 			this.fromExtend = options.fromExtend == 'true'
-		},
-		onShow() {
-			this.extendTip = '请在 ' + this.currentHotel.checkoutTime + ' 前办理续住,逾期请至前台办理'
+			if (this.fromExtend) {
+				await this.queryCanExtend()
+			}
 		},
 		// #ifdef MP-WEIXIN
 		onShareAppMessage(info) {
@@ -563,7 +570,7 @@
 		margin-top: 40%;
 	}
 
-	.extend-tip {
+	.end-time-tip {
 		transform: translateY(-100rpx);
 	}
 </style>

+ 1 - 1
subpkg_checkin/confirmOrder/confirmOrder.vue

@@ -435,7 +435,7 @@
 		},
 		async onLoad() {
 			let res = await uni.$http.post(`/hotel/roomType`, {
-				hotelId: this.order.hotelId,
+				hotelId: this.currentHotel.hotelId,
 				roomType: this.order.roomType
 			})
 			this.roomPicPath = IMG_BASE_URL + '/' + res.data.data.roomPicPath

+ 9 - 0
subpkg_checkin/selectRoom/selectRoom.vue

@@ -95,6 +95,15 @@
 			this.roomType = options.roomType
 			//查询该房间类型在订单时间段内可用的所有房间
 			await this.getRoomInfo();
+			if (this.roomList.length === 0) {
+				uni.showModal({
+					title: '该房型无可用房间可供选择,请选择其它房型',
+					showCancel: false,
+					success() {
+						uni.navigateBack()
+					}
+				})
+			}
 		},
 		// #ifdef MP-WEIXIN
 		onShareAppMessage(info) {