Explorar el Código

修改校园打卡成功逻辑,暂时移除人脸识别功能

MS-CIAZDCOIXVRW\Administrator hace 3 años
padre
commit
5ca1e97d46

+ 2 - 2
pages/index/index.vue

@@ -17,10 +17,10 @@
 					<image src="../../static/images/air.png" mode=""></image>
 					<image src="../../static/images/air.png" mode=""></image>
 					<text>共享空调</text>
 					<text>共享空调</text>
 				</navigator>
 				</navigator>
-				<!-- <navigator :url="'/pagesClockIn/index/index'" open-type="navigate" class="menu_item">
+				<navigator :url="'/pagesClockIn/index/index'" open-type="navigate" class="menu_item">
 					<image src="../../static/images/clockIn.png" mode=""></image>
 					<image src="../../static/images/clockIn.png" mode=""></image>
 					<text>校园打卡</text>
 					<text>校园打卡</text>
-				</navigator> -->
+				</navigator>
 			</view>
 			</view>
 		</view>
 		</view>
 		<view class="qr_code" v-if="showQR_code">
 		<view class="qr_code" v-if="showQR_code">

+ 2 - 2
pagesClockIn/addRules/addRules.vue

@@ -114,7 +114,7 @@
 			</view>
 			</view>
 		</view>
 		</view>
 
 
-		<view class="box">
+		<!-- <view class="box">
 			<view class="name">
 			<view class="name">
 				是否需要人脸识别:
 				是否需要人脸识别:
 			</view>
 			</view>
@@ -122,7 +122,7 @@
 				<switch style="transform:scale(0.8)" color="#3396FB" :checked="faceRecognition"
 				<switch style="transform:scale(0.8)" color="#3396FB" :checked="faceRecognition"
 					@change="switchChange_faceRecognition" />
 					@change="switchChange_faceRecognition" />
 			</view>
 			</view>
-		</view>
+		</view> -->
 
 
 		<view class="box">
 		<view class="box">
 			<view class="name">
 			<view class="name">

+ 2 - 2
pagesClockIn/cardRecord/cardRecord.vue

@@ -64,14 +64,14 @@
 						</view>
 						</view>
 					</view> -->
 					</view> -->
 
 
-					<view class="imgs_item">
+					<!-- <view class="imgs_item">
 						<view class="image" @click="handleBigImg(item.matchFaceImage)">
 						<view class="image" @click="handleBigImg(item.matchFaceImage)">
 							<img :src="item.matchFaceImage||'../static/imgs/headImage.png'">
 							<img :src="item.matchFaceImage||'../static/imgs/headImage.png'">
 						</view>
 						</view>
 						<view class="title">
 						<view class="title">
 							被匹对照片
 							被匹对照片
 						</view>
 						</view>
-					</view>
+					</view> -->
 
 
 					<view class="imgs_item">
 					<view class="imgs_item">
 						<view class="image" @click="handleBigImg(item.sceneImage)">
 						<view class="image" @click="handleBigImg(item.sceneImage)">

+ 4 - 4
pagesClockIn/editRules/editRules.vue

@@ -115,7 +115,7 @@
 			</view>
 			</view>
 		</view>
 		</view>
 
 
-		<view class="box">
+		<!-- <view class="box">
 			<view class="name">
 			<view class="name">
 				是否需要人脸识别:
 				是否需要人脸识别:
 			</view>
 			</view>
@@ -123,7 +123,7 @@
 				<switch style="transform:scale(0.8)" color="#3396FB" :checked="faceRecognition"
 				<switch style="transform:scale(0.8)" color="#3396FB" :checked="faceRecognition"
 					@change="switchChange_faceRecognition" />
 					@change="switchChange_faceRecognition" />
 			</view>
 			</view>
-		</view>
+		</view> -->
 
 
 		<view class="box">
 		<view class="box">
 			<view class="name">
 			<view class="name">
@@ -328,7 +328,7 @@
 									// 编辑的规则id
 									// 编辑的规则id
 									id: this.id,
 									id: this.id,
 									// 是否需要人脸识别
 									// 是否需要人脸识别
-									faceRecognition: true,
+									faceRecognition: this.faceRecognition,
 									// 考勤组ID列表
 									// 考勤组ID列表
 									groupIds: this.groupIds,
 									groupIds: this.groupIds,
 									// 是否同步节假日
 									// 是否同步节假日
@@ -340,7 +340,7 @@
 									// 提前通知时间
 									// 提前通知时间
 									noticeTime: this.value,
 									noticeTime: this.value,
 									// 是否需要场景拍照
 									// 是否需要场景拍照
-									takePicture: true,
+									takePicture: this.takePicture,
 									// 打卡地点列表
 									// 打卡地点列表
 									locations: this.locations,
 									locations: this.locations,
 									// 打卡时间列表
 									// 打卡时间列表

+ 34 - 21
pagesClockIn/home/home.vue

@@ -398,33 +398,46 @@
 				this.changeType()
 				this.changeType()
 			},
 			},
 			// 点击打卡按钮回调
 			// 点击打卡按钮回调
+			// handlePunch(info) {
+			// 	if (this.flags) {
+			// 		let obj = JSON.stringify(info)
+			// 		// 如果场景照片和人脸识别都需要
+			// 		if (this.faceRecognition && this.takePicture) {
+			// 			uni.navigateTo({
+			// 				url: `/pagesClockIn/location/location?obj=${obj}`
+			// 			})
+			// 		}
+			// 		// 如果都不需要
+			// 		else if (!this.faceRecognition && !this.takePicture) {
+			// 			this.handleUploading()
+			// 		}
+			// 		// 如果只需要场景照片
+			// 		else if (this.takePicture) {
+			// 			uni.navigateTo({
+			// 				url: `/pagesClockIn/location/location?obj=${obj}&flag=1`
+			// 			})
+			// 		}
+			// 		// 如果只需要人脸识别
+			// 		else if (this.faceRecognition) {
+			// 			// uni.navigateTo({
+			// 			// 	url: `/pagesClockIn/authentication/authentication?id=${this.contrastObj.id}&address=${this.address}&latitude=${this.myLat}&longitude=${this.myLng}&flag=1`
+			// 			// })
+			// 			uni.navigateTo({
+			// 				url: `/pagesClockIn/location/location?obj=${obj}&flag=1`
+			// 			})
+			// 		}
+			// 	}
+			// },
 			handlePunch(info) {
 			handlePunch(info) {
 				if (this.flags) {
 				if (this.flags) {
 					let obj = JSON.stringify(info)
 					let obj = JSON.stringify(info)
-					// 如果场景照片和人脸识别都需要
-					if (this.faceRecognition && this.takePicture) {
-						uni.navigateTo({
-							url: `/pagesClockIn/location/location?obj=${obj}`
-						})
-					}
-					// 如果都不需要
-					else if (!this.faceRecognition && !this.takePicture) {
-						this.handleUploading()
-					}
-					// 如果只需要场景照片
-					else if (this.takePicture) {
-						uni.navigateTo({
-							url: `/pagesClockIn/location/location?obj=${obj}&flag=1`
-						})
-					}
-					// 如果只需要人脸识别
-					else if (this.faceRecognition) {
-						// uni.navigateTo({
-						// 	url: `/pagesClockIn/authentication/authentication?id=${this.contrastObj.id}&address=${this.address}&latitude=${this.myLat}&longitude=${this.myLng}&flag=1`
-						// })
+					// 如果需要场景照片
+					if (this.takePicture) {
 						uni.navigateTo({
 						uni.navigateTo({
 							url: `/pagesClockIn/location/location?obj=${obj}&flag=1`
 							url: `/pagesClockIn/location/location?obj=${obj}&flag=1`
 						})
 						})
+					}else{
+						this.handleUploading()
 					}
 					}
 				}
 				}
 			},
 			},

+ 2 - 2
pagesClockIn/statDetail/statDetail.vue

@@ -64,14 +64,14 @@
 						</view>
 						</view>
 					</view> -->
 					</view> -->
 
 
-					<view class="imgs_item">
+					<!-- <view class="imgs_item">
 						<view class="image" @click="handleBigImg(item.matchFaceImage)">
 						<view class="image" @click="handleBigImg(item.matchFaceImage)">
 							<img :src="item.matchFaceImage||'../static/imgs/headImage.png'">
 							<img :src="item.matchFaceImage||'../static/imgs/headImage.png'">
 						</view>
 						</view>
 						<view class="title">
 						<view class="title">
 							被匹对照片
 							被匹对照片
 						</view>
 						</view>
-					</view>
+					</view> -->
 					<view class="imgs_item">
 					<view class="imgs_item">
 						<view class="image" @click="handleBigImg(item.sceneImage)">
 						<view class="image" @click="handleBigImg(item.sceneImage)">
 							<img :src="item.sceneImage||'../static/imgs/headImage.png'">
 							<img :src="item.sceneImage||'../static/imgs/headImage.png'">