Преглед на файлове

opt:修改更新用户信息的逻辑,若当前用户信息不全则再人证比对后更新用户信息

LiChengjin преди 3 месеца
родител
ревизия
d10030bec0
променени са 1 файла, в които са добавени 14 реда и са изтрити 11 реда
  1. 14 11
      subpkg_checkin/addGuest/addGuest.vue

+ 14 - 11
subpkg_checkin/addGuest/addGuest.vue

@@ -50,7 +50,8 @@
 				@close="handleSheetClose" />
 		</view>
 		<view class="shoot-id-card" v-if="shootCard">
-			<camera id="card-camera" flash="off" device-position="back" @ready="cameraContext" :style="[cardCameraStyle]" />
+			<camera id="card-camera" flash="off" device-position="back" @ready="cameraContext"
+				:style="[cardCameraStyle]" />
 			<cover-image :src="frontSelect ? '/static/identity_info.png' : '/static/national_emblem.png'"
 				:style="[cardCameraStyle]"></cover-image>
 			<view class="camera-btn">
@@ -103,7 +104,7 @@
 
 					<!-- #ifdef MP-ALIPAY -->
 					<camera id="faceCheck-camera" flash="off" device-position="front" @ready="faceCheckCamera"
-					:style="[faceCheckCameraStyle]"/>
+						:style="[faceCheckCameraStyle]" />
 					<cover-image src="/static/cover.png" :style="[faceCheckCoverImageStyle]"></cover-image>
 					<!-- #endif -->
 				</view>
@@ -277,8 +278,7 @@
 
 				// #ifdef MP-ALIPAY
 				actionSheetVisible: false,
-				actions: [
-					{
+				actions: [{
 						text: "拍照",
 						key: "shoot"
 					},
@@ -997,7 +997,9 @@
 						quality: 'normal',
 					})
 					// console.log("完成takePhoto", photo.tempImagePath);
-					const { data: photoBase64 } = await this.fileSystem.readFile({
+					const {
+						data: photoBase64
+					} = await this.fileSystem.readFile({
 						filePath: photo.tempImagePath,
 						encoding: "base64"
 					})
@@ -1110,9 +1112,8 @@
 							})
 						}
 						if (this.isMainCustomer) {
-							//如果是主入住人,且当前账号姓名和身份证号信息与所传身份证不一致,则更新账号信息为主入住人信息
-							if (this.userInfo.name !== this.name || this.userInfo.idNumber !== this
-								.idNumber) {
+							//如果是主入住人,且当前账号姓名和身份证号为空,则更新账号信息为主入住人信息
+							if (!this.userInfo.name || !this.userInfo.idNumber) {
 								this.userInfo.name = this.name
 								this.userInfo.idNumber = this.idNumber
 								this.updateUserInfo(this.userInfo)
@@ -1459,9 +1460,8 @@
 										})
 									}
 									if (this.isMainCustomer) {
-										//如果是主入住人,且当前账号姓名和身份证号信息与所传身份证不一致,则更新账号信息为主入住人信息
-										if (this.userInfo.name !== this.name || this.userInfo.idNumber !== this
-											.idNumber) {
+										//如果是主入住人,且当前账号姓名和身份证号为空,则更新账号信息为主入住人信息
+										if (!this.userInfo.name || !this.userInfo.idNumber) {
 											this.userInfo.name = this.name
 											this.userInfo.idNumber = this.idNumber
 											this.updateUserInfo(this.userInfo)
@@ -1704,6 +1704,7 @@
 							// box-sizing: border-box;
 						}
 					}
+
 					// #endif
 
 					// #ifdef MP-ALIPAY
@@ -1729,6 +1730,7 @@
 						box-sizing: border-box;
 						color: red;
 					}
+
 					// #endif
 				}
 
@@ -1789,6 +1791,7 @@
 				.btn {
 					margin: 20rpx;
 				}
+
 				// #endif
 			}