Bladeren bron

2024年3月18日17:16:30

chubiao 11 maanden geleden
bovenliggende
commit
75485ebfd9
2 gewijzigde bestanden met toevoegingen van 21 en 13 verwijderingen
  1. 4 2
      manifest.json
  2. 17 11
      pages/info/add.vue

+ 4 - 2
manifest.json

@@ -85,7 +85,8 @@
                 },
                 "/api" : {
                     // "target" : "http://10.16.4.9:8080", // 需要跨域的域名
-                    "target" : "http://10.16.4.5:8080", // 需要跨域的域名
+                    // "target" : "http://10.16.4.5:8080", // 需要跨域的域名
+                    "target" : "https://www.jlyanglao.com/prod-api", // 需要跨域的域名
 
                     // "target" : "http://121.36.73.159:805", // 需要跨域的域名
                     "changeOrigin" : true,
@@ -96,7 +97,8 @@
                 },
                 "/uploadPath" : {
                     // "target" : "http://10.16.4.9:8080/file/uploadPath/", // 需要跨域的域名
-                    "target" : "http://10.16.4.5:8080/file/uploadPath/", // 需要跨域的域名
+                    // "target" : "http://10.16.4.5:8080/file/uploadPath/", // 需要跨域的域名
+                    "target" : "https://www.jlyanglao.com/prod-api/file/uploadPath/", // 需要跨域的域名
 
                     // "target" : "http://121.36.73.159:805/file/uploadPath/", // 需要跨域的域名
                     "changeOrigin" : true,

+ 17 - 11
pages/info/add.vue

@@ -293,17 +293,18 @@
 			getAccessToken(this.callbackToken)
 			window.addEventListener("message", e => {
 				if (e.data.data && e.data.data.arg.base64) {
-					this.faceBase64 = ''
-					this.cardType = uni.getStorageSync("cardType")
-
-					if (this.cardType == 'front') e.data.data.arg.base64 = jl.front
-					if (this.cardType == 'back') e.data.data.arg.base64 = jl.back
-
 					setTimeout(() => {
 						uni.showLoading({
 							title: '正在识别中...'
 						})
 					}, 100);
+					this.faceBase64 = ''
+					this.cardType = uni.getStorageSync("cardType")
+					console.log("正反面",this.cardType);
+					// if (this.cardType == 'front') e.data.data.arg.base64 = jl.front
+					// if (this.cardType == 'back') e.data.data.arg.base64 = jl.back
+
+					
 					// 压缩	
 					translateAll(base64ToUrl(e.data.data.arg.base64), (base64, blobUrl) => {
 						idcard(base64, this.token, this.cardType, this.callbackIdcard)
@@ -415,6 +416,7 @@
 				if (!this.cardType) {
 					this.cardType = uni.getStorageSync("cardType")
 				}
+				console.log(words, this.cardType);
 				if (this.cardType == 'front') {
 					if (!words) {
 						showConfirm('请上传正确的身份证人像面')
@@ -459,8 +461,12 @@
 					this.zjcaijianSrc = 'data:image/jpeg;base64,' + words.card_image
 					this.disabled = false
 
-					this.baseFormData.lrXb = getDictInfo(this.dicts.C0007, words.words_result['性别'].words)[0].value
-					this.baseFormData.lrMz = getDictInfo(this.dicts.C0009, words.words_result['民族'].words)[0].value
+					// this.baseFormData.lrXb = getDictInfo(this.dicts.C0007, words.words_result['性别'].words)[0].value
+					// this.baseFormData.lrMz = getDictInfo(this.dicts.C0009, words.words_result['民族'].words)[0].value
+
+					this.baseFormData.lrXb = words.words_result['性别'].words
+					this.baseFormData.lrMz = words.words_result['民族'].words
+
 
 					this.idcardFace = words.photo
 					this.idcardFaceUrl = base64ToUrl(words.photo);
@@ -680,21 +686,21 @@
 						paramFiles.push(this.tkzmList[0])
 						// 特殊材料待审核
 						this.baseFormData.lzzt = 5
-						this.baseFormData.lrSpyj = '同意'
+						this.baseFormData.lrSpyj = ''
 					}
 					if (this.baseFormData.isdb == 1 && this.dbzmList.length == 1 && this.dbzmList[0].indexOf(
 							'data:image') > -1) {
 						paramFiles.push(this.dbzmList[0])
 						// 特殊材料待审核
 						this.baseFormData.lzzt = 5
-						this.baseFormData.lrSpyj = '同意'
+						this.baseFormData.lrSpyj = ''
 					}
 					if (this.baseFormData.iszc == 1 && this.zczmList.length == 1 && this.zczmList[0].indexOf(
 							'data:image') > -1) {
 						paramFiles.push(this.zczmList[0])
 						// 特殊材料待审核
 						this.baseFormData.lzzt = 5
-						this.baseFormData.lrSpyj = '同意'
+						this.baseFormData.lrSpyj = ''
 					}
 
 					UploadSome({