Browse Source

修复了一些问题

zyh 2 months ago
parent
commit
84f4ebb47d

+ 4 - 5
components/customField/customField.js

@@ -37,6 +37,10 @@ Component({
 			if (!this.data.customField) {
 				return;
 			}
+			//有未填写过&展示的
+			this.setData({
+				list: this.data.customField
+			});
 			//判断是否有未填写的
 			let data = this.data.customField.some(i => {
 				return i.customNameVal === null && i.isShow == 1
@@ -46,15 +50,10 @@ Component({
 				this.triggerEvent('isFillFields', this.data.customField);
 				return;
 			}
-			//有未填写过&展示的
-			this.setData({
-				list: this.data.customField
-			});
 			//判断是否有可编辑的
 			let result = this.data.customField.some(j => {
 				return j.customNameVal === null && j.isShow == 1 && j.isEditable == 1
 			})
-
 			this.triggerEvent('isFillFields', !result?this.data.customField:false)
 		},
 		// 下拉

+ 1 - 1
components/face_verify/face_verify.js

@@ -271,7 +271,7 @@ Component({
 			let taskId = app.data.faceTaskId;
 			// taskId = '00-2023041314125357889'; //本地
 			// taskId = '00-993306131355291200'; //线上
-			// taskId = '00-2024050112393311886' //zyh线上
+			taskId = '00-2024050112393311886' //zyh线上
 			if (!taskId) return;
 			let res = await face.getFace_wxrlxf('/api/next/doQueryFaceSuccess', 'get', {
 				taskId: taskId

+ 1 - 1
pages/mine/mine.js

@@ -140,7 +140,7 @@ Page({
 		}
 		if(type == 2) {
 			wx.navigateTo({
-				url: '/pages/regular_register/regular_register?justCertification=true'
+				url: '/pages/regular_register/regular_register'
 			})
 			return;
 		}

+ 5 - 3
pages/regular_register/regular_register.js

@@ -269,6 +269,7 @@ Page({
 				})
 				return;
 			}
+			console.log(!res.data);
 			this.setData({
 				isShowApplet: res.data,
 				isFillFields: !res.data,
@@ -323,7 +324,7 @@ Page({
 		this.updateSetting()
 		this.getContextByAdminId();
 		//判断是否完成自定义字段的填写,完成则直接提交
-		if (this.data.isFillFields) {
+		if (this.data.isFillFields && !this.data.customField) {
 			this.sure();
 		}
 	},
@@ -335,7 +336,7 @@ Page({
 		this.updateSetting()
 		this.getContextByAdminId()
 		//判断是否完成自定义字段的填写,完成则直接提交
-		if (this.data.isFillFields) {
+		if (this.data.isFillFields && !this.data.customField) {
 			this.sure();
 		}
 	},
@@ -344,7 +345,7 @@ Page({
 		if (!this.data.companyAdminId || !this.data.userInfo) {
 			return;
 		}
-		selectContextByCardId(this.data.buildingAdminId, this.data.userInfo.userId).then(res => {
+		selectContextByCardId(this.data.companyAdminId, this.data.userInfo.userId).then(res => {
 			this.setData({
 				customField: res.data
 			})
@@ -378,6 +379,7 @@ Page({
 	},
 	// 判断是否填写完成
 	isFillFields(e) {
+		console.log(e.detail);
 		if (e.detail == false) {
 			this.data.isFillFields = false;
 		} else {

+ 7 - 5
pages/visitor_make/visitor_make.js

@@ -243,12 +243,10 @@ Page({
 	},
 	// 获取用户填写的自定义字段内容
 	getContextByAdminId() {
-		console.log(!this.data.buildingAdminId);
-		console.log(!this.data.userInfo);
-		if (!this.data.buildingAdminId || !this.data.userInfo) {
+		if (!this.data.companyAdminId || !this.data.userInfo) {
 			return;
 		}
-		selectContextByCardId(this.data.buildingAdminId, this.data.userInfo.userId).then(res => {
+		selectContextByCardId(this.data.companyAdminId, this.data.userInfo.userId).then(res => {
 			console.log(res.data);
 			console.log(this.data.isShowApplet);
 			this.setData({
@@ -404,6 +402,8 @@ Page({
 						companyIndex: e.detail.index,
 						'form.visiteeCompany': e.detail.companyName,
 						'form.visiteeCompanyId': e.detail.adminId,
+						companyName: e.detail.companyName,
+						companyAdminId: e.detail.adminId
 					})
 				}
 				break;
@@ -472,6 +472,8 @@ Page({
 			this.setData({
 				companyList: res.data[0].userWhiteIntervieweeVOList,
 				companyIndex: 0,
+				companyName: res.data[0].userWhiteIntervieweeVOList[0].companyName,
+				companyAdminId: res.data[0].userWhiteIntervieweeVOList[0].adminId,
 				'form.visiteeXm': res.data[0].userWhiteIntervieweeVOList[0].name,
 				'form.visiteeCompany': res.data[0].userWhiteIntervieweeVOList[0].companyName,
 				'form.userWhitelistId': res.data[0].userWhiteIntervieweeVOList[0].userWhitelistId,
@@ -610,7 +612,7 @@ Page({
 				})
 				this.matchCorrectPhone();
 				if (this.data.userInfo) {
-					this.getContextStatusByAdminId(res.data.visiteeBuildingId)
+					this.getContextStatusByAdminId(res.data.visiteeCompanyId)
 					this.getContextByAdminId()
 				}
 				this.doCheckAdmin();