Prechádzať zdrojové kódy

opt:续住、退房、梯控二维码、手机钥匙等页面,在未入住、退房、时间到期后,统一界面

Shu 1 mesiac pred
rodič
commit
be887a117d

+ 7 - 14
subpkg/elevatorControl/elevatorControl.vue

@@ -73,7 +73,8 @@
 			</view>
 		</view>
 		<view v-else class="not-reservation">
-			<text class="tip">您还未入住!</text>
+			<u-text class="tip" text="您还未入住!" align="center"></u-text>
+			<u-text class="tip" text="若已退房或房间到期,请至前台办理" align="center"></u-text>
 		</view>
 	</view>
 </template>
@@ -205,8 +206,8 @@
 			let {data: infoRes} = await getCheckinInfo(this.currentHotel.hotelId)
 			console.log("获取入住记录", infoRes);
 
-			if (infoRes.code !== 200 || !infoRes.success) {
-				console.log("获取入住记录失败", info.data.data);
+			if (infoRes.code !== 200 || !infoRes.success || !infoRes.data) {
+				console.log("获取入住记录失败", infoRes);
 				return
 			}
 
@@ -315,17 +316,9 @@
 				}
 			}
 		}
+	}
 
-		.not-reservation {
-			display: flex;
-			justify-content: center;
-			height: 100%;
-			text-align: center;
-			vertical-align: 100rpx;
-
-			.tip {
-				padding-top: 40%;
-			}
-		}
+	.not-reservation {
+		margin-top: 40%;
 	}
 </style>

+ 5 - 12
subpkg/emergencyKey/emergencyKey.vue

@@ -69,7 +69,8 @@
 			</view>
 		</view>
 		<view v-else class="not-reservation">
-			<text class="tip">您还未入住!</text>
+			<u-text class="tip" text="您还未入住!" align="center"></u-text>
+			<u-text class="tip" text="若已退房或房间到期,请至前台办理" align="center"></u-text>
 		</view>
 	</view>
 </template>
@@ -175,17 +176,9 @@
 				}
 			}
 		}
+	}
 
-		.not-reservation {
-			display: flex;
-			justify-content: center;
-			height: 100%;
-			text-align: center;
-			vertical-align: 100rpx;
-
-			.tip {
-				padding-top: 40%;
-			}
-		}
+	.not-reservation {
+		margin-top: 40%;
 	}
 </style>

+ 5 - 1
subpkg/extend/extend.vue

@@ -84,7 +84,8 @@
 		<view v-else>
 			<view class="not-reservation">
 				<u-text class="tip" text="您还未入住!" align="center"></u-text>
-				<u-text v-if="fromExtend" class="tip" text="若已退房或房间到期,请至前台办理" align="center"></u-text>
+				<!-- <u-text v-if="fromExtend" class="tip" text="若已退房或房间到期,请至前台办理" align="center"></u-text> -->
+				<u-text class="tip" text="若已退房或房间到期,请至前台办理" align="center"></u-text>
 			</view>
 		</view>
 	</view>
@@ -415,6 +416,9 @@
 		},
 		async onLoad(options) {
 			await this.getCheckinInfo()
+			if (Object.keys(this.checkinInfo).length <= 0) {
+				return
+			}
 			this.fromExtend = options.fromExtend == 'true'
 			if (this.fromExtend) {
 				await this.queryCanExtend()