ソースを参照

修改人脸识别参数

xiaoxin 2 年 前
コミット
00dbd085a8
1 ファイル変更47 行追加47 行削除
  1. 47 47
      pagesClockIn/authentication/authentication.vue

+ 47 - 47
pagesClockIn/authentication/authentication.vue

@@ -204,7 +204,7 @@ export default {
 					filePath: url,
 					filePath: url,
 					name: 'file',
 					name: 'file',
 					formData: {
 					formData: {
-						mIdCard: this.cardNumber
+						mCardNumber: this.cardNumber
 					},
 					},
 					header: {
 					header: {
 						platform: 2,
 						platform: 2,
@@ -244,52 +244,52 @@ export default {
 		},
 		},
 
 
 		// 对比人脸请求
 		// 对比人脸请求
-		handleEncrypt(imgUrl) {
-			uni.showLoading({
-				title: '认证中,请稍后...'
-			})
-			uni.request({
-				url: 'https://chtech.ncjti.edu.cn/testingServer/faceVerification/api/identity-comparison-record/comparison',
-				method: 'post',
-				data: {
-					data: RSAencrypt(
-						encrypt(
-							JSON.stringify({
-								url: imgUrl,
-								name: this.name,
-								// name: '周祥',
-								idCard: this.cardNumber,
-								category: '校园打卡',
-								studentNumber: this.cardNumber
-							})
-						)
-					)
-				},
-				success: (res) => {
-					if (res.data.status == 200) {
-						let result = JSON.parse(decrypt(res.data.authorization))
-						// console.log(result)
-						if (result.status == 200) {
-							uni.showToast({
-								title: result.desc
-							})
-							setTimeout(() => {
-								this.handleUploading(imgUrl)
-							}, 1500)
-						} else {
-							uni.showToast({
-								title: `${result.desc},请重新认证`,
-								icon: 'error',
-								duration: 2000
-							})
-							this.tempImg = ''
-							this.isAuthCamera = true
-							// this.initData()
-						}
-					}
-				}
-			})
-		},
+		// handleEncrypt(imgUrl) {
+		// 	uni.showLoading({
+		// 		title: '认证中,请稍后...'
+		// 	})
+		// 	uni.request({
+		// 		url: 'https://chtech.ncjti.edu.cn/testingServer/faceVerification/api/identity-comparison-record/comparison',
+		// 		method: 'post',
+		// 		data: {
+		// 			data: RSAencrypt(
+		// 				encrypt(
+		// 					JSON.stringify({
+		// 						url: imgUrl,
+		// 						name: this.name,
+		// 						// name: '周祥',
+		// 						idCard: this.cardNumber,
+		// 						category: '校园打卡',
+		// 						studentNumber: this.cardNumber
+		// 					})
+		// 				)
+		// 			)
+		// 		},
+		// 		success: (res) => {
+		// 			if (res.data.status == 200) {
+		// 				let result = JSON.parse(decrypt(res.data.authorization))
+		// 				// console.log(result)
+		// 				if (result.status == 200) {
+		// 					uni.showToast({
+		// 						title: result.desc
+		// 					})
+		// 					setTimeout(() => {
+		// 						this.handleUploading(imgUrl)
+		// 					}, 1500)
+		// 				} else {
+		// 					uni.showToast({
+		// 						title: `${result.desc},请重新认证`,
+		// 						icon: 'error',
+		// 						duration: 2000
+		// 					})
+		// 					this.tempImg = ''
+		// 					this.isAuthCamera = true
+		// 					// this.initData()
+		// 				}
+		// 			}
+		// 		}
+		// 	})
+		// },
 		async handleUploading(imgUrl) {
 		async handleUploading(imgUrl) {
 			let res = await this.$myRequest_clockIn({
 			let res = await this.$myRequest_clockIn({
 				url: '/attendance/api/sign/check/in/update',
 				url: '/attendance/api/sign/check/in/update',