2 Commits 6ba87997d2 ... 1119f66182

Auteur SHA1 Bericht Datum
  Shu 1119f66182 opt:修改预约开票显示内容和联系前台行为 1 maand geleden
  Shu be887a117d opt:续住、退房、梯控二维码、手机钥匙等页面,在未入住、退房、时间到期后,统一界面 1 maand geleden
4 gewijzigde bestanden met toevoegingen van 35 en 37 verwijderingen
  1. 18 10
      pages/my/my.vue
  2. 7 14
      subpkg/elevatorControl/elevatorControl.vue
  3. 5 12
      subpkg/emergencyKey/emergencyKey.vue
  4. 5 1
      subpkg/extend/extend.vue

+ 18 - 10
pages/my/my.vue

@@ -25,7 +25,7 @@
 
 		<view class="middle">
 			<view class="middle--item" v-for="(item, index) in itemList" :key="item.src">
-				<view class="middle--item__content" @click="navigateTo(item.url)">
+				<view class="middle--item__content" @click="navigateTo(item.url, item.text)">
 					<view class="middle--item__img">
 						<u-image :src="item.src" :width="item.width" :height="item.height" mode="aspectFit"></u-image>
 					</view>
@@ -89,18 +89,12 @@
 		},
 		computed: {
 			...mapState('m_user', ['userInfo', 'token']),
-			listDebug() {
-				return [{
-					src: "/static/change_hotel.png",
-					text: "选择酒店",
-					url: '/subpkg/changeHotel/changeHotel'
-				}]
-			}
+			...mapState("m_business", ["currentHotel"]),
 		},
 		methods: {
 			...mapMutations('m_user', ['updateUserInfo', 'updateToken']),
 			...mapMutations('m_business', ['updateCurrentHotel', 'updateIdCardInfo']),
-			navigateTo(url) {
+			navigateTo(url, text) {
 				if (url !== '' && url !== null && url !== undefined) {
 					if (url === '/pages/order/order') {
 						uni.switchTab({
@@ -112,7 +106,21 @@
 						})
 					}
 				} else {
-					uni.$showMsg('功能开发中,敬请期待')
+					if (text === "预约开票") {
+						uni.$showMsg('该酒店不支持该服务,请至前台办理')
+					} else if (text === "联系前台") {
+						uni.showModal({
+							title: "联系前台",
+							content: `将要拨打前台电话:${this.currentHotel.phone}`,
+							success: (res) => {
+							if (res.confirm) {
+								uni.makePhoneCall({
+								phoneNumber: this.currentHotel.phone,
+								});
+							}
+							},
+						});
+					}
 				}
 			},
 			async logout() {

+ 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()