yangg 2 hafta önce
ebeveyn
işleme
4442d59f62

+ 261 - 79
pages/Personal/Personal.vue

@@ -55,12 +55,12 @@
 			<view v-if="currentStep === 1" class="form-container">
 				<!-- 第一行 -->
 				<view class="form-row">
-					<view class="form-item">
+					<view class="form-item" v-if="showNameField">
 						<text class="label required">姓名</text>
 						<input type="text" v-model="formData.name" placeholder="请输入姓名" :class="{'input-error': formErrors.name}" />
 						<text v-if="formErrors.name" class="error-message">{{formErrors.name}}</text>
 					</view>
-					<view class="form-item">
+					<view class="form-item" v-if="showGenderField">
 						<text class="label required">性别</text>
 						<picker @change="bindGenderChange" :value="genderIndex" :range="genderOptions">
 							<view class="picker-text" :class="{'input-error': formErrors.gender}">{{ genderOptions[genderIndex] || '请选择性别' }}</view>
@@ -76,7 +76,7 @@
 						<text v-if="formErrors.threePeriod" class="error-message">{{formErrors.threePeriod}}</text>
 					</view>
 					<view class="form-row">
-					<view class="form-item">
+					<view class="form-item" v-if="showPhoneField">
 						<text class="label required">手机号</text>
 						<input type="number" v-model="formData.phone" placeholder="请输入手机号" :class="{'input-error': formErrors.phone}" />
 						<text v-if="formErrors.phone" class="error-message">{{formErrors.phone}}</text>
@@ -89,7 +89,7 @@
 						</picker>
 					</view> -->
 				</view>
-					<view class="form-item">
+					<view class="form-item" v-if="showIdCardField">
 						<text class="label required">身份证号</text>
 						<input type="idcard" v-model="formData.idCard" placeholder="请输入身份证号" :class="{'input-error': formErrors.idCard}" />
 						<text v-if="formErrors.idCard" class="error-message">{{formErrors.idCard}}</text>
@@ -100,7 +100,7 @@
 							<view class="picker-text">{{ politicalOptions[politicalIndex] || '请选择政治面貌' }}</view>
 						</picker>
 					</view> -->
-					<view class="form-item">
+					<view class="form-item" v-if="showEthnicField">
 						<text class="label required">民族</text>
 						<picker @change="bindEthnicChange" :value="ethnicIndex" :range="ethnicOptions">
 							<view class="picker-text" :class="{'input-error': formErrors.ethnic}">{{ ethnicOptions[ethnicIndex] || '请选择民族' }}</view>
@@ -110,11 +110,11 @@
 				
 				<!-- 第三行 -->
 				<view class="form-row">
-					<view class="form-item">
+					<view class="form-item" v-if="showHeightField">
 						<text class="label">身高(cm)</text>
 						<input type="digit" v-model="formData.height" placeholder="请输入身高" />
 					</view>
-					<view class="form-item">
+					<view class="form-item" v-if="showWeightField">
 						<text class="label">体重(kg)</text>
 						<input type="digit" v-model="formData.weight" placeholder="请输入体重" />
 					</view>
@@ -163,23 +163,23 @@
 							</view>
 						</view>
 						<view class="family-member-content">
-							<view class="family-member-row">
+							<view class="family-member-row" v-if="showFamilyRelationField">
 								<text class="family-member-label">称谓:</text>
 								<text class="family-member-value">{{member.relation}}</text>
 							</view>
-							<view class="family-member-row">
+							<view class="family-member-row" v-if="showFamilyNameField">
 								<text class="family-member-label">姓名:</text>
 								<text class="family-member-value">{{member.name}}</text>
 							</view>
-							<view class="family-member-row">
+							<view class="family-member-row" v-if="showFamilyWorkplaceField">
 								<text class="family-member-label">工作单位/家庭地址:</text>
 								<text class="family-member-value">{{member.workplaceOrAddress}}</text>
 							</view>
-							<view class="family-member-row">
+							<view class="family-member-row" v-if="showFamilyPositionField">
 								<text class="family-member-label">职务:</text>
 								<text class="family-member-value">{{member.position}}</text>
 							</view>
-							<view class="family-member-row">
+							<view class="family-member-row" v-if="showFamilyPhoneField">
 								<text class="family-member-label">联系电话:</text>
 								<text class="family-member-value">{{member.phone}}</text>
 							</view>
@@ -199,22 +199,22 @@
 					</view>
 					
 					<view class="form-row">
-						<view class="form-item">
+						<view class="form-item" v-if="showFamilyRelationField">
 							<text class="label required">称谓</text>
 							<input 
 								type="text" 
 								v-model="familyMemberForm.relation" 
-								placeholder="如:父亲、母亲、配偶等" 
+								placeholder="如:父亲、母亲、配偶等"
 								:class="{'input-error': familyMemberErrors.relation}"
 							/>
 							<text v-if="familyMemberErrors.relation" class="error-message">{{familyMemberErrors.relation}}</text>
 						</view>
-						<view class="form-item">
+						<view class="form-item" v-if="showFamilyNameField">
 							<text class="label required">姓名</text>
 							<input 
 								type="text" 
 								v-model="familyMemberForm.name" 
-								placeholder="请输入姓名" 
+								placeholder="请输入姓名"
 								:class="{'input-error': familyMemberErrors.name}"
 							/>
 							<text v-if="familyMemberErrors.name" class="error-message">{{familyMemberErrors.name}}</text>
@@ -222,12 +222,12 @@
 					</view>
 					
 					<view class="form-row">
-						<view class="form-item">
+						<view class="form-item" v-if="showFamilyWorkplaceField">
 							<text class="label ">工作单位/家庭地址</text>
 							<input type="text" v-model="familyMemberForm.workplaceOrAddress" placeholder="请输入工作单位或家庭地址" />
 							<!-- <text v-if="familyMemberErrors.workplaceOrAddress" class="error-message">{{familyMemberErrors.workplaceOrAddress}}</text> -->
 						</view>
-						<view class="form-item ">
+						<view class="form-item" v-if="showFamilyPositionField">
 							<text class="label ">职务</text>
 							<input type="text" v-model="familyMemberForm.position" placeholder="请输入职务" />
 							<!-- <text v-if="familyMemberErrors.position" class="error-message">{{familyMemberErrors.position}}</text> -->
@@ -235,12 +235,12 @@
 					</view>
 					
 					<view class="form-row">
-						<view class="form-item">
+						<view class="form-item" v-if="showFamilyPhoneField">
 							<text class="label required">联系电话</text>
 							<input 
 								type="number" 
 								v-model="familyMemberForm.phone" 
-								placeholder="请输入联系电话" 
+								placeholder="请输入联系电话"
 								:class="{'input-error': familyMemberErrors.phone}"
 							/>
 							<text v-if="familyMemberErrors.phone" class="error-message">{{familyMemberErrors.phone}}</text>
@@ -280,19 +280,19 @@
 							</view>
 						</view>
 						<view class="education-content">
-							<view class="education-row">
+							<view class="education-row" v-if="showEducationTimeField">
 								<text class="education-label">起止时间:</text>
 								<text class="education-value">{{edu.startTime}} 至 {{edu.endTime}}</text>
 							</view>
-							<view class="education-row">
+							<view class="education-row" v-if="showEducationSchoolField">
 								<text class="education-label">学校名称:</text>
 								<text class="education-value">{{edu.schoolName}}</text>
 							</view>
-							<view class="education-row">
+							<view class="education-row" v-if="showEducationMajorField">
 								<text class="education-label">专业:</text>
 								<text class="education-value">{{edu.major}}</text>
 							</view>
-							<view class="education-row">
+							<view class="education-row" v-if="showEducationDegreeField">
 								<text class="education-label">学历:</text>
 								<text class="education-value">{{edu.degree}}</text>
 							</view>
@@ -308,7 +308,7 @@
 					</view>
 					
 					<view class="form-row">
-						<view class="form-item">
+						<view class="form-item" v-if="showEducationTimeField">
 							<text class="label required">起止时间</text>
 							<view class="date-range">
 								<picker 
@@ -335,22 +335,22 @@
 					</view>
 					
 					<view class="form-row">
-						<view class="form-item">
+						<view class="form-item" v-if="showEducationSchoolField">
 							<text class="label required">学校名称</text>
 							<input 
 								type="text" 
 								v-model="educationForm.schoolName" 
-								placeholder="请输入学校名称" 
+								placeholder="请输入学校名称"
 								:class="{'input-error': educationErrors.schoolName}"
 							/>
 							<text v-if="educationErrors.schoolName" class="error-message">{{educationErrors.schoolName}}</text>
 						</view>
-						<view class="form-item">
+						<view class="form-item" v-if="showEducationMajorField">
 							<text class="label required">专业</text>
 							<input 
 								type="text" 
 								v-model="educationForm.major" 
-								placeholder="请输入专业" 
+								placeholder="请输入专业"
 								:class="{'input-error': educationErrors.major}"
 							/>
 							<text v-if="educationErrors.major" class="error-message">{{educationErrors.major}}</text>
@@ -358,7 +358,7 @@
 					</view>
 					
 					<view class="form-row">
-						<view class="form-item">
+						<view class="form-item" v-if="showEducationDegreeField">
 							<text class="label required">学历</text>
 							<picker 
 								@change="bindDegreeChange" 
@@ -422,35 +422,35 @@
 							</view>
 						</view>
 						<view class="work-content">
-							<view class="work-row">
+							<view class="work-row" v-if="showWorkTimeField">
 								<text class="work-label">起止时间:</text>
 								<text class="work-value">{{work.startTime}} 至 {{work.endTime}}</text>
 							</view>
-							<view class="work-row">
+							<view class="work-row" v-if="showWorkCompanyField">
 								<text class="work-label">单位名称:</text>
 								<text class="work-value">{{work.companyName}}</text>
 							</view>
-							<view class="work-row">
+							<view class="work-row" v-if="showWorkDepartmentField">
 								<text class="work-label">任职部门:</text>
 								<text class="work-value">{{work.department}}</text>
 							</view>
-							<view class="work-row">
+							<view class="work-row" v-if="showWorkEmployeeCountField">
 								<text class="work-label">单位人数:</text>
 								<text class="work-value">{{work.employeeCount}}</text>
 							</view>
-							<view class="work-row">
+							<view class="work-row" v-if="showWorkPositionField">
 								<text class="work-label">担任职务:</text>
 								<text class="work-value">{{work.position}}</text>
 							</view>
-							<view class="work-row">
+							<view class="work-row" >
 								<text class="work-label">月总收入:</text>
 								<text class="work-value">{{work.monthlySalary}}</text>
 							</view>
-							<view class="work-row">
+							<view class="work-row" >
 								<text class="work-label">直接领导:</text>
 								<text class="work-value">{{work.supervisor}}</text>
 							</view>
-							<view class="work-row">
+							<view class="work-row" >
 								<text class="work-label">领导电话:</text>
 								<text class="work-value">{{work.supervisorPhone}}</text>
 							</view>
@@ -466,7 +466,7 @@
 					</view>
 					
 					<view class="form-row">
-						<view class="form-item">
+						<view class="form-item" v-if="showWorkTimeField">
 							<text class="label required">起止时间</text>
 							<view class="date-range">
 								<picker 
@@ -493,17 +493,17 @@
 					</view>
 					
 					<view class="form-row">
-						<view class="form-item">
+						<view class="form-item" v-if="showWorkCompanyField">
 							<text class="label required">单位名称</text>
 							<input 
 								type="text" 
 								v-model="workForm.companyName" 
-								placeholder="请输入单位名称" 
+								placeholder="请输入单位名称"
 								:class="{'input-error': workErrors.companyName}"
 							/>
 							<text v-if="workErrors.companyName" class="error-message">{{workErrors.companyName}}</text>
 						</view>
-						<view class="form-item">
+						<view class="form-item" v-if="showWorkEmployeeCountField">
 							<text class="label required">单位人数</text>
 							<input 
 								type="number" 
@@ -516,7 +516,7 @@
 					</view>
 					
 					<view class="form-row">
-						<view class="form-item">
+						<view class="form-item" v-if="showWorkDepartmentField">
 							<text class="label required">任职部门</text>
 							<input 
 								type="text" 
@@ -526,7 +526,7 @@
 							/>
 							<text v-if="workErrors.department" class="error-message">{{workErrors.department}}</text>
 						</view>
-						<view class="form-item">
+						<view class="form-item" v-if="showWorkPositionField">
 							<text class="label required">担任职务</text>
 							<input 
 								type="text" 
@@ -539,7 +539,7 @@
 					</view>
 					
 					<view class="form-row">
-						<view class="form-item">
+						<view class="form-item" >
 							<text class="label required">月总收入</text>
 							<input type="number" v-model="workForm.monthlySalary" placeholder="请输入月总收入" />
 							<text v-if="workErrors.monthlySalary" class="error-message">{{workErrors.monthlySalary}}</text>
@@ -547,7 +547,7 @@
 					</view>
 					
 					<view class="form-row">
-						<view class="form-item">
+						<view class="form-item" >
 							<text class="label required">直接领导</text>
 							<input type="text" v-model="workForm.supervisor" placeholder="请输入直接领导姓名" />
 							<text v-if="workErrors.supervisor" class="error-message">{{workErrors.supervisor}}</text>
@@ -773,12 +773,26 @@ import { apiBaseUrl } from '@/common/config.js';
 						pattern: /^\d+(\.\d{1,2})?$/,
 						message: '请输入正确的期望薪资'
 					}
-				}
+				},
+				// 获取配置信息
+				configData: (() => {
+					try {
+						const configStr = uni.getStorageSync('configData');
+						if (configStr && configStr.trim()) {
+							return JSON.parse(configStr);
+						}
+						return {};
+					} catch (error) {
+						console.warn('解析配置数据失败:', error);
+						return {};
+					}
+				})()
 			}
 		},
 		onLoad() {
 			// Fetch user data when component loads
 			this.fetchUserData();
+			console.log(this.configData)
 		},
 		computed: {
 			// 添加计算属性来控制按钮显示
@@ -794,6 +808,89 @@ import { apiBaseUrl } from '@/common/config.js';
 			// 获取当前步骤在数组中的索引
 			currentStepIndex() {
 				return this.steps.findIndex(step => step.id === this.currentStep);
+			},
+			// 添加安全的配置访问器
+			safeConfigData() {
+				return this.configData || {};
+			},
+			safeProfileFieldsConfig() {
+				return this.safeConfigData.profile_fields_config || {};
+			},
+			safeFamilyFieldsConfig() {
+				return this.safeConfigData.family_fields_config || {};
+			},
+			safeEducationFieldsConfig() {
+				return this.safeConfigData.education_fields_config || {};
+			},
+			safeWorkFieldsConfig() {
+				return this.safeConfigData.work_experience_fields_config || {};
+			},
+			// 字段显示控制方法
+			showNameField() {
+				return Object.keys(this.safeProfileFieldsConfig).length === 0 || this.safeProfileFieldsConfig.name?.visible !== false;
+			},
+			showGenderField() {
+				return Object.keys(this.safeProfileFieldsConfig).length === 0 || this.safeProfileFieldsConfig.gender?.visible !== false;
+			},
+			showPhoneField() {
+				return Object.keys(this.safeProfileFieldsConfig).length === 0 || this.safeProfileFieldsConfig.phone?.visible !== false;
+			},
+			showIdCardField() {
+				return Object.keys(this.safeProfileFieldsConfig).length === 0 || this.safeProfileFieldsConfig.id_card?.visible !== false;
+			},
+			showEthnicField() {
+				return Object.keys(this.safeProfileFieldsConfig).length === 0 || this.safeProfileFieldsConfig.ethnic?.visible !== false;
+			},
+			showHeightField() {
+				return Object.keys(this.safeProfileFieldsConfig).length === 0 || this.safeProfileFieldsConfig.height?.visible !== false;
+			},
+			showWeightField() {
+				return Object.keys(this.safeProfileFieldsConfig).length === 0 || this.safeProfileFieldsConfig.weight?.visible !== false;
+			},
+			// 家庭成员字段显示控制
+			showFamilyRelationField() {
+				return Object.keys(this.safeFamilyFieldsConfig).length === 0 || this.safeFamilyFieldsConfig.relation?.visible !== false;
+			},
+			showFamilyNameField() {
+				return Object.keys(this.safeFamilyFieldsConfig).length === 0 || this.safeFamilyFieldsConfig.name?.visible !== false;
+			},
+			showFamilyWorkplaceField() {
+				return Object.keys(this.safeFamilyFieldsConfig).length === 0 || this.safeFamilyFieldsConfig.workplace_or_address?.visible !== false;
+			},
+			showFamilyPositionField() {
+				return Object.keys(this.safeFamilyFieldsConfig).length === 0 || this.safeFamilyFieldsConfig.position?.visible !== false;
+			},
+			showFamilyPhoneField() {
+				return Object.keys(this.safeFamilyFieldsConfig).length === 0 || this.safeFamilyFieldsConfig.phone?.visible !== false;
+			},
+			// 教育经历字段显示控制
+			showEducationTimeField() {
+				return Object.keys(this.safeEducationFieldsConfig).length === 0 || this.safeEducationFieldsConfig.start_time?.visible !== false;
+			},
+			showEducationSchoolField() {
+				return Object.keys(this.safeEducationFieldsConfig).length === 0 || this.safeEducationFieldsConfig.school_name?.visible !== false;
+			},
+			showEducationMajorField() {
+				return Object.keys(this.safeEducationFieldsConfig).length === 0 || this.safeEducationFieldsConfig.major?.visible !== false;
+			},
+			showEducationDegreeField() {
+				return Object.keys(this.safeEducationFieldsConfig).length === 0 || this.safeEducationFieldsConfig.degree?.visible !== false;
+			},
+			// 工作经历字段显示控制
+			showWorkTimeField() {
+				return Object.keys(this.safeWorkFieldsConfig).length === 0 || this.safeWorkFieldsConfig.start_time?.visible !== false;
+			},
+			showWorkCompanyField() {
+				return Object.keys(this.safeWorkFieldsConfig).length === 0 || this.safeWorkFieldsConfig.company_name?.visible !== false;
+			},
+			showWorkDepartmentField() {
+				return Object.keys(this.safeWorkFieldsConfig).length === 0 || this.safeWorkFieldsConfig.department?.visible !== false;
+			},
+			showWorkEmployeeCountField() {
+				return Object.keys(this.safeWorkFieldsConfig).length === 0 || this.safeWorkFieldsConfig.employee_count?.visible !== false;
+			},
+			showWorkPositionField() {
+				return Object.keys(this.safeWorkFieldsConfig).length === 0 || this.safeWorkFieldsConfig.position?.visible !== false;
 			}
 		},
 		methods: {
@@ -812,6 +909,66 @@ import { apiBaseUrl } from '@/common/config.js';
 				}
 			},
 			
+			// 添加字段是否需要验证的判断方法
+			shouldValidateField(fieldName, section) {
+				section = section || 'profile';
+				switch (section) {
+					case 'profile':
+						const fieldShowMap = {
+							'name': this.showNameField,
+							'gender': this.showGenderField,
+							'phone': this.showPhoneField,
+							'idCard': this.showIdCardField,
+							'ethnic': this.showEthnicField,
+							'height': this.showHeightField,
+							'weight': this.showWeightField,
+							'currentAddress': true, // 现居住地址总是显示和必填
+							'expectedSalary': true, // 期望薪资总是显示
+							'skills': true, // 专业技能总是显示和必填
+							'training': true, // 培训经历总是显示和必填
+							'threePeriod': this.formData.gender === '女' // 只有女性时才需要验证三期状态
+						};
+						return fieldShowMap[fieldName] !== false;
+						
+					case 'family':
+						const familyFieldShowMap = {
+							'relation': this.showFamilyRelationField,
+							'name': this.showFamilyNameField,
+							'phone': this.showFamilyPhoneField,
+							'workplaceOrAddress': this.showFamilyWorkplaceField,
+							'position': this.showFamilyPositionField
+						};
+						return familyFieldShowMap[fieldName] !== false;
+						
+					case 'education':
+						const educationFieldShowMap = {
+							'startTime': this.showEducationTimeField,
+							'endTime': this.showEducationTimeField,
+							'schoolName': this.showEducationSchoolField,
+							'major': this.showEducationMajorField,
+							'degree': this.showEducationDegreeField
+						};
+						return educationFieldShowMap[fieldName] !== false;
+						
+					case 'work':
+						const workFieldShowMap = {
+							'startTime': this.showWorkTimeField,
+							'endTime': this.showWorkTimeField,
+							'companyName': this.showWorkCompanyField,
+							'department': this.showWorkDepartmentField,
+							'position': this.showWorkPositionField,
+							'employeeCount': this.showWorkEmployeeCountField,
+							'monthlySalary': true, // 月薪总是需要验证
+							'supervisor': true, // 直接领导总是需要验证
+							'supervisorPhone': true // 领导电话总是需要验证
+						};
+						return workFieldShowMap[fieldName] !== false;
+						
+					default:
+						return true;
+				}
+			},
+			
 			bindGenderChange(e) {
 				this.genderIndex = e.detail.value;
 				this.formData.gender = this.genderOptions[this.genderIndex];
@@ -824,11 +981,16 @@ import { apiBaseUrl } from '@/common/config.js';
 				if (this.formData.gender !== '女') {
 					this.formData.threePeriod = '';
 					this.threePeriodIndex = -1;
+					this.formErrors.threePeriod = ''; // 清除三期状态的错误提示
 				}
 			},
 			bindThreePeriodChange(e) {
 				this.threePeriodIndex = e.detail.value;
 				this.formData.threePeriod = this.threePeriodOptions[this.threePeriodIndex];
+				// 清除三期状态的错误提示
+				if (this.formErrors.threePeriod) {
+					this.formErrors.threePeriod = '';
+				}
 			},
 			bindPoliticalChange(e) {
 				this.politicalIndex = e.detail.value;
@@ -856,30 +1018,31 @@ import { apiBaseUrl } from '@/common/config.js';
 				// 验证必填字段
 				let isValid = true;
 				
-				if (!this.familyMemberForm.relation) {
+				// 只验证显示的字段
+				if (this.shouldValidateField('relation', 'family') && !this.familyMemberForm.relation) {
 					this.familyMemberErrors.relation = '请输入称谓';
 					isValid = false;
 				}
 				
-				if (!this.familyMemberForm.name) {
+				if (this.shouldValidateField('name', 'family') && !this.familyMemberForm.name) {
 					this.familyMemberErrors.name = '请输入姓名';
 					isValid = false;
 				}
 				
-				/* if (!this.familyMemberForm.workplaceOrAddress) {
+				if (this.shouldValidateField('workplaceOrAddress', 'family') && !this.familyMemberForm.workplaceOrAddress) {
 					this.familyMemberErrors.workplaceOrAddress = '请输入工作单位/家庭地址';
 					isValid = false;
 				}
 				
-				if (!this.familyMemberForm.position) {
+				if (this.shouldValidateField('position', 'family') && !this.familyMemberForm.position) {
 					this.familyMemberErrors.position = '请输入职务';
 					isValid = false;
-				} */
+				}
 				
-				if (!this.familyMemberForm.phone) {
+				if (this.shouldValidateField('phone', 'family') && !this.familyMemberForm.phone) {
 					this.familyMemberErrors.phone = '请输入联系电话';
 					isValid = false;
-				} else if (!/^1[3-9]\d{9}$/.test(this.familyMemberForm.phone)) {
+				} else if (this.shouldValidateField('phone', 'family') && this.familyMemberForm.phone && !/^1[3-9]\d{9}$/.test(this.familyMemberForm.phone)) {
 					this.familyMemberErrors.phone = '请输入正确的手机号';
 					isValid = false;
 				}
@@ -1007,27 +1170,28 @@ import { apiBaseUrl } from '@/common/config.js';
 				// 验证必填字段
 				let isValid = true;
 				
-				if (!this.educationForm.startTime) {
+				// 只验证显示的字段
+				if (this.shouldValidateField('startTime', 'education') && !this.educationForm.startTime) {
 					this.educationErrors.startTime = '请选择开始时间';
 					isValid = false;
 				}
 				
-				if (!this.educationForm.endTime) {
+				if (this.shouldValidateField('endTime', 'education') && !this.educationForm.endTime) {
 					this.educationErrors.endTime = '请选择结束时间';
 					isValid = false;
 				}
 				
-				if (!this.educationForm.schoolName) {
+				if (this.shouldValidateField('schoolName', 'education') && !this.educationForm.schoolName) {
 					this.educationErrors.schoolName = '请输入学校名称';
 					isValid = false;
 				}
 				
-				if (!this.educationForm.major) {
+				if (this.shouldValidateField('major', 'education') && !this.educationForm.major) {
 					this.educationErrors.major = '请输入专业';
 					isValid = false;
 				}
 				
-				if (!this.educationForm.degree) {
+				if (this.shouldValidateField('degree', 'education') && !this.educationForm.degree) {
 					this.educationErrors.degree = '请选择学历';
 					isValid = false;
 				}
@@ -1131,47 +1295,48 @@ import { apiBaseUrl } from '@/common/config.js';
 				// 验证必填字段
 				let isValid = true;
 
-				if (!this.workForm.startTime) {
+				// 只验证显示的字段
+				if (this.shouldValidateField('startTime', 'work') && !this.workForm.startTime) {
 					this.workErrors.startTime = '请选择开始时间';
 					isValid = false;
 				}
 
-				if (!this.workForm.endTime) {
+				if (this.shouldValidateField('endTime', 'work') && !this.workForm.endTime) {
 					this.workErrors.endTime = '请选择结束时间';
 					isValid = false;
 				}
 
-				if (!this.workForm.companyName) {
+				if (this.shouldValidateField('companyName', 'work') && !this.workForm.companyName) {
 					this.workErrors.companyName = '请输入单位名称';
 					isValid = false;
 				}
 
-				if (!this.workForm.department) {
+				if (this.shouldValidateField('department', 'work') && !this.workForm.department) {
 					this.workErrors.department = '请输入任职部门';
 					isValid = false;
 				}
 
-				if (!this.workForm.position) {
+				if (this.shouldValidateField('position', 'work') && !this.workForm.position) {
 					this.workErrors.position = '请输入担任职务';
 					isValid = false;
 				}
 
-				if (!this.workForm.employeeCount) {
+				if (this.shouldValidateField('employeeCount', 'work') && !this.workForm.employeeCount) {
 					this.workErrors.employeeCount = '请输入单位人数';
 					isValid = false;
 				}
 
-				if (!this.workForm.monthlySalary) {
+				if (this.shouldValidateField('monthlySalary', 'work') && !this.workForm.monthlySalary) {
 					this.workErrors.monthlySalary = '请输入月薪';
 					isValid = false;
 				}
 
-				if (!this.workForm.supervisor) {	
+				if (this.shouldValidateField('supervisor', 'work') && !this.workForm.supervisor) {	
 					this.workErrors.supervisor = '请输入直属上级';
 					isValid = false;
 				}
 
-				if (!this.workForm.supervisorPhone) {
+				if (this.shouldValidateField('supervisorPhone', 'work') && !this.workForm.supervisorPhone) {
 					this.workErrors.supervisorPhone = '请输入直属上级电话';
 					isValid = false;
 				}
@@ -1269,11 +1434,22 @@ import { apiBaseUrl } from '@/common/config.js';
 
 				let isValid = true;
 				allRequired.forEach(field => {
-					if (!this.validateField(field, this.formData[field])) {
+					// 只验证显示的字段
+					if (this.shouldValidateField(field) && !this.validateField(field, this.formData[field])) {
 						isValid = false;
 					}
 				});
 
+				// 验证专业技能和培训
+				if (this.shouldValidateField('skills') && !this.formData.skills?.trim()) {
+					this.formErrors.skills = '请描述您的专业技能';
+					isValid = false;
+				}
+				if (this.shouldValidateField('training') && !this.formData.training?.trim()) {
+					this.formErrors.training = '请描述您的培训经历';
+					isValid = false;
+				}
+
 				if (!isValid) {
 					uni.showToast({
 						title: '请完善所有必填信息',
@@ -1605,31 +1781,32 @@ import { apiBaseUrl } from '@/common/config.js';
 					case 1: // 基本信息
 						const basicFields = ['name', 'gender', 'phone', 'idCard', 'ethnic', 'currentAddress'];
 						basicFields.forEach(field => {
-							if (!this.validateField(field, this.formData[field])) {
+							// 只验证显示的字段
+							if (this.shouldValidateField(field) && !this.validateField(field, this.formData[field])) {
 								isValid = false;
 							}
 						});
 
 						// 特殊验证:女性三期状态
-						if (this.formData.gender === '女' && this.threePeriodIndex === -1) {
+						if (this.shouldValidateField('threePeriod') && this.formData.gender === '女' && this.threePeriodIndex === -1) {
 							this.formErrors.threePeriod = '请选择三期状态';
 							isValid = false;
 						}
 
 						// 可选字段验证(如果有值则验证格式)
-						if (this.formData.height) {
+						if (this.shouldValidateField('height') && this.formData.height) {
 							isValid = this.validateField('height', this.formData.height) && isValid;
 						}
-						if (this.formData.weight) {
+						if (this.shouldValidateField('weight') && this.formData.weight) {
 							isValid = this.validateField('weight', this.formData.weight) && isValid;
 						}
-						if (this.formData.expectedSalary) {
+						if (this.shouldValidateField('expectedSalary') && this.formData.expectedSalary) {
 							isValid = this.validateField('expectedSalary', this.formData.expectedSalary) && isValid;
 						}
 						break;
 
 					case 3: // 家庭成员
-					console.log(this.familyMembers.length);
+						console.log(this.familyMembers.length);
 						if (this.familyMembers.length == 0) {
 							uni.showToast({
 								title: '请至少添加一位家庭成员',
@@ -1650,11 +1827,11 @@ import { apiBaseUrl } from '@/common/config.js';
 						break;
 
 					case 6: // 专业技能
-						if (!this.formData.skills?.trim()) {
+						if (this.shouldValidateField('skills') && !this.formData.skills?.trim()) {
 							this.formErrors.skills = '请描述您的专业技能';
 							isValid = false;
 						}
-						if (!this.formData.training?.trim()) {
+						if (this.shouldValidateField('training') && !this.formData.training?.trim()) {
 							this.formErrors.training = '请描述您的培训经历';
 							isValid = false;
 						}
@@ -1895,6 +2072,11 @@ import { apiBaseUrl } from '@/common/config.js';
 				const rule = this.validationRules[fieldName];
 				if (!rule) return true;
 
+				// 如果字段被隐藏,不进行验证
+				if (!this.shouldValidateField(fieldName)) {
+					return true;
+				}
+
 				// 重置该字段的错误信息
 				this.formErrors[fieldName] = '';
 
@@ -1905,7 +2087,7 @@ import { apiBaseUrl } from '@/common/config.js';
 				}
 
 				// 正则验证
-				if (rule.pattern && !rule.pattern.test(value)) {
+				if (rule.pattern && value && !rule.pattern.test(value)) {
 					this.formErrors[fieldName] = rule.message;
 					return false;
 				}
@@ -2041,7 +2223,7 @@ import { apiBaseUrl } from '@/common/config.js';
 
 					if (currentStepFields) {
 						currentStepFields.forEach(field => {
-							if (newVal[field] !== undefined) {
+							if (newVal[field] !== undefined && this.shouldValidateField(field)) {
 								this.validateField(field, newVal[field]);
 							}
 						});

+ 3 - 3
pages/camera/camera.vue

@@ -240,9 +240,9 @@
   },
 		methods: {
 			initPersonDetectionWebSocket() {
-      if (this.personDetectionSocket) {
-        this.cleanupPersonDetectionWebSocket();
-      }
+				if (this.personDetectionSocket) {
+					this.cleanupPersonDetectionWebSocket();
+				}
 
       try {
         this.personDetectionSocket = uni.connectSocket({

+ 12 - 1
pages/identity-verify/identity-verify.vue

@@ -237,7 +237,18 @@ export default {
       videoList: [], // 修改为空数组,将通过API获取
       // 其他属性保持不变...
       questions: [], // 添加新属性存储API返回的问题数据
-      introVideoUrl: 'https://data.qicai321.com/minlong/ee4d9cce-c3d5-4350-8c6e-684283827897.mp4', // 保留介绍视频
+      introVideoUrl: (() => {
+					try {
+						const configStr = uni.getStorageSync('configData');
+						if (configStr && configStr.trim()) {
+							return JSON.parse(configStr).digital_human_opening_video_url || 'https://data.qicai321.com/minlong/ee4d9cce-c3d5-4350-8c6e-684283827897.mp4';
+						}
+						return 'https://data.qicai321.com/minlong/ee4d9cce-c3d5-4350-8c6e-684283827897.mp4';
+					} catch (error) {
+						console.warn('解析配置数据失败:', error);
+						return {};
+					}
+				})(),//'https://data.qicai321.com/minlong/ee4d9cce-c3d5-4350-8c6e-684283827897.mp4', // 保留介绍视频
       isRecording: false,
       recordingTimer: null,
       showStopRecordingButton: false,

+ 35 - 1
pages/index/index.vue

@@ -310,6 +310,40 @@ import { apiBaseUrl } from '@/common/config.js';
 				
 				console.log('已选择职位:', job.id, job.title);
 			},
+			// 获取当前职位配置
+			getConfig(){
+				uni.request({
+					url: `${apiBaseUrl}/api/job/config/position/${this.selectedJobId}`,
+					method: 'GET',
+					data: {
+						openid: JSON.parse(uni.getStorageSync('userInfo')).openid
+					},
+					header: {
+						'content-type': 'application/x-www-form-urlencoded'
+					},
+					success: (res) => {
+						// 身份验证成功后,继续提交用户信息
+						console.log(res);
+						if (res.statusCode === 200) {
+							if (res.data.code === 2000) {
+								uni.setStorageSync('configData', JSON.stringify(res.data.data))
+							} else {
+								
+							}
+						} else {
+							uni.hideLoading();
+							
+						}
+					},
+					fail: (err) => {
+						uni.hideLoading();
+						uni.showToast({
+							title: '网络错误,请稍后重试',
+							icon: 'none'
+						});
+					}
+				});
+			},
 			applyForJob() {
 				if (!this.checkLogin()) {
 					return;
@@ -344,7 +378,7 @@ import { apiBaseUrl } from '@/common/config.js';
 							console.error('更新用户信息失败:', e);
 						}
 					}
-					
+					this.getConfig()
 					uni.navigateTo({
 						url: '/pages/Personal/Personal',
 						fail: (err) => {

+ 546 - 264
unpackage/dist/dev/mp-weixin/pages/Personal/Personal.js

@@ -183,11 +183,25 @@ const _sfc_main = {
           pattern: /^\d+(\.\d{1,2})?$/,
           message: "请输入正确的期望薪资"
         }
-      }
+      },
+      // 获取配置信息
+      configData: (() => {
+        try {
+          const configStr = common_vendor.index.getStorageSync("configData");
+          if (configStr && configStr.trim()) {
+            return JSON.parse(configStr);
+          }
+          return {};
+        } catch (error) {
+          console.warn("解析配置数据失败:", error);
+          return {};
+        }
+      })()
     };
   },
   onLoad() {
     this.fetchUserData();
+    console.log(this.configData);
   },
   computed: {
     // 添加计算属性来控制按钮显示
@@ -203,6 +217,110 @@ const _sfc_main = {
     // 获取当前步骤在数组中的索引
     currentStepIndex() {
       return this.steps.findIndex((step) => step.id === this.currentStep);
+    },
+    // 添加安全的配置访问器
+    safeConfigData() {
+      return this.configData || {};
+    },
+    safeProfileFieldsConfig() {
+      return this.safeConfigData.profile_fields_config || {};
+    },
+    safeFamilyFieldsConfig() {
+      return this.safeConfigData.family_fields_config || {};
+    },
+    safeEducationFieldsConfig() {
+      return this.safeConfigData.education_fields_config || {};
+    },
+    safeWorkFieldsConfig() {
+      return this.safeConfigData.work_experience_fields_config || {};
+    },
+    // 字段显示控制方法
+    showNameField() {
+      var _a;
+      return Object.keys(this.safeProfileFieldsConfig).length === 0 || ((_a = this.safeProfileFieldsConfig.name) == null ? void 0 : _a.visible) !== false;
+    },
+    showGenderField() {
+      var _a;
+      return Object.keys(this.safeProfileFieldsConfig).length === 0 || ((_a = this.safeProfileFieldsConfig.gender) == null ? void 0 : _a.visible) !== false;
+    },
+    showPhoneField() {
+      var _a;
+      return Object.keys(this.safeProfileFieldsConfig).length === 0 || ((_a = this.safeProfileFieldsConfig.phone) == null ? void 0 : _a.visible) !== false;
+    },
+    showIdCardField() {
+      var _a;
+      return Object.keys(this.safeProfileFieldsConfig).length === 0 || ((_a = this.safeProfileFieldsConfig.id_card) == null ? void 0 : _a.visible) !== false;
+    },
+    showEthnicField() {
+      var _a;
+      return Object.keys(this.safeProfileFieldsConfig).length === 0 || ((_a = this.safeProfileFieldsConfig.ethnic) == null ? void 0 : _a.visible) !== false;
+    },
+    showHeightField() {
+      var _a;
+      return Object.keys(this.safeProfileFieldsConfig).length === 0 || ((_a = this.safeProfileFieldsConfig.height) == null ? void 0 : _a.visible) !== false;
+    },
+    showWeightField() {
+      var _a;
+      return Object.keys(this.safeProfileFieldsConfig).length === 0 || ((_a = this.safeProfileFieldsConfig.weight) == null ? void 0 : _a.visible) !== false;
+    },
+    // 家庭成员字段显示控制
+    showFamilyRelationField() {
+      var _a;
+      return Object.keys(this.safeFamilyFieldsConfig).length === 0 || ((_a = this.safeFamilyFieldsConfig.relation) == null ? void 0 : _a.visible) !== false;
+    },
+    showFamilyNameField() {
+      var _a;
+      return Object.keys(this.safeFamilyFieldsConfig).length === 0 || ((_a = this.safeFamilyFieldsConfig.name) == null ? void 0 : _a.visible) !== false;
+    },
+    showFamilyWorkplaceField() {
+      var _a;
+      return Object.keys(this.safeFamilyFieldsConfig).length === 0 || ((_a = this.safeFamilyFieldsConfig.workplace_or_address) == null ? void 0 : _a.visible) !== false;
+    },
+    showFamilyPositionField() {
+      var _a;
+      return Object.keys(this.safeFamilyFieldsConfig).length === 0 || ((_a = this.safeFamilyFieldsConfig.position) == null ? void 0 : _a.visible) !== false;
+    },
+    showFamilyPhoneField() {
+      var _a;
+      return Object.keys(this.safeFamilyFieldsConfig).length === 0 || ((_a = this.safeFamilyFieldsConfig.phone) == null ? void 0 : _a.visible) !== false;
+    },
+    // 教育经历字段显示控制
+    showEducationTimeField() {
+      var _a;
+      return Object.keys(this.safeEducationFieldsConfig).length === 0 || ((_a = this.safeEducationFieldsConfig.start_time) == null ? void 0 : _a.visible) !== false;
+    },
+    showEducationSchoolField() {
+      var _a;
+      return Object.keys(this.safeEducationFieldsConfig).length === 0 || ((_a = this.safeEducationFieldsConfig.school_name) == null ? void 0 : _a.visible) !== false;
+    },
+    showEducationMajorField() {
+      var _a;
+      return Object.keys(this.safeEducationFieldsConfig).length === 0 || ((_a = this.safeEducationFieldsConfig.major) == null ? void 0 : _a.visible) !== false;
+    },
+    showEducationDegreeField() {
+      var _a;
+      return Object.keys(this.safeEducationFieldsConfig).length === 0 || ((_a = this.safeEducationFieldsConfig.degree) == null ? void 0 : _a.visible) !== false;
+    },
+    // 工作经历字段显示控制
+    showWorkTimeField() {
+      var _a;
+      return Object.keys(this.safeWorkFieldsConfig).length === 0 || ((_a = this.safeWorkFieldsConfig.start_time) == null ? void 0 : _a.visible) !== false;
+    },
+    showWorkCompanyField() {
+      var _a;
+      return Object.keys(this.safeWorkFieldsConfig).length === 0 || ((_a = this.safeWorkFieldsConfig.company_name) == null ? void 0 : _a.visible) !== false;
+    },
+    showWorkDepartmentField() {
+      var _a;
+      return Object.keys(this.safeWorkFieldsConfig).length === 0 || ((_a = this.safeWorkFieldsConfig.department) == null ? void 0 : _a.visible) !== false;
+    },
+    showWorkEmployeeCountField() {
+      var _a;
+      return Object.keys(this.safeWorkFieldsConfig).length === 0 || ((_a = this.safeWorkFieldsConfig.employee_count) == null ? void 0 : _a.visible) !== false;
+    },
+    showWorkPositionField() {
+      var _a;
+      return Object.keys(this.safeWorkFieldsConfig).length === 0 || ((_a = this.safeWorkFieldsConfig.position) == null ? void 0 : _a.visible) !== false;
     }
   },
   methods: {
@@ -220,6 +338,69 @@ const _sfc_main = {
         });
       }
     },
+    // 添加字段是否需要验证的判断方法
+    shouldValidateField(fieldName, section) {
+      section = section || "profile";
+      switch (section) {
+        case "profile":
+          const fieldShowMap = {
+            "name": this.showNameField,
+            "gender": this.showGenderField,
+            "phone": this.showPhoneField,
+            "idCard": this.showIdCardField,
+            "ethnic": this.showEthnicField,
+            "height": this.showHeightField,
+            "weight": this.showWeightField,
+            "currentAddress": true,
+            // 现居住地址总是显示和必填
+            "expectedSalary": true,
+            // 期望薪资总是显示
+            "skills": true,
+            // 专业技能总是显示和必填
+            "training": true,
+            // 培训经历总是显示和必填
+            "threePeriod": this.formData.gender === "女"
+            // 只有女性时才需要验证三期状态
+          };
+          return fieldShowMap[fieldName] !== false;
+        case "family":
+          const familyFieldShowMap = {
+            "relation": this.showFamilyRelationField,
+            "name": this.showFamilyNameField,
+            "phone": this.showFamilyPhoneField,
+            "workplaceOrAddress": this.showFamilyWorkplaceField,
+            "position": this.showFamilyPositionField
+          };
+          return familyFieldShowMap[fieldName] !== false;
+        case "education":
+          const educationFieldShowMap = {
+            "startTime": this.showEducationTimeField,
+            "endTime": this.showEducationTimeField,
+            "schoolName": this.showEducationSchoolField,
+            "major": this.showEducationMajorField,
+            "degree": this.showEducationDegreeField
+          };
+          return educationFieldShowMap[fieldName] !== false;
+        case "work":
+          const workFieldShowMap = {
+            "startTime": this.showWorkTimeField,
+            "endTime": this.showWorkTimeField,
+            "companyName": this.showWorkCompanyField,
+            "department": this.showWorkDepartmentField,
+            "position": this.showWorkPositionField,
+            "employeeCount": this.showWorkEmployeeCountField,
+            "monthlySalary": true,
+            // 月薪总是需要验证
+            "supervisor": true,
+            // 直接领导总是需要验证
+            "supervisorPhone": true
+            // 领导电话总是需要验证
+          };
+          return workFieldShowMap[fieldName] !== false;
+        default:
+          return true;
+      }
+    },
     bindGenderChange(e) {
       this.genderIndex = e.detail.value;
       this.formData.gender = this.genderOptions[this.genderIndex];
@@ -229,11 +410,15 @@ const _sfc_main = {
       if (this.formData.gender !== "女") {
         this.formData.threePeriod = "";
         this.threePeriodIndex = -1;
+        this.formErrors.threePeriod = "";
       }
     },
     bindThreePeriodChange(e) {
       this.threePeriodIndex = e.detail.value;
       this.formData.threePeriod = this.threePeriodOptions[this.threePeriodIndex];
+      if (this.formErrors.threePeriod) {
+        this.formErrors.threePeriod = "";
+      }
     },
     bindPoliticalChange(e) {
       this.politicalIndex = e.detail.value;
@@ -256,18 +441,26 @@ const _sfc_main = {
     saveFamilyMember() {
       this.resetFamilyMemberErrors();
       let isValid = true;
-      if (!this.familyMemberForm.relation) {
+      if (this.shouldValidateField("relation", "family") && !this.familyMemberForm.relation) {
         this.familyMemberErrors.relation = "请输入称谓";
         isValid = false;
       }
-      if (!this.familyMemberForm.name) {
+      if (this.shouldValidateField("name", "family") && !this.familyMemberForm.name) {
         this.familyMemberErrors.name = "请输入姓名";
         isValid = false;
       }
-      if (!this.familyMemberForm.phone) {
+      if (this.shouldValidateField("workplaceOrAddress", "family") && !this.familyMemberForm.workplaceOrAddress) {
+        this.familyMemberErrors.workplaceOrAddress = "请输入工作单位/家庭地址";
+        isValid = false;
+      }
+      if (this.shouldValidateField("position", "family") && !this.familyMemberForm.position) {
+        this.familyMemberErrors.position = "请输入职务";
+        isValid = false;
+      }
+      if (this.shouldValidateField("phone", "family") && !this.familyMemberForm.phone) {
         this.familyMemberErrors.phone = "请输入联系电话";
         isValid = false;
-      } else if (!/^1[3-9]\d{9}$/.test(this.familyMemberForm.phone)) {
+      } else if (this.shouldValidateField("phone", "family") && this.familyMemberForm.phone && !/^1[3-9]\d{9}$/.test(this.familyMemberForm.phone)) {
         this.familyMemberErrors.phone = "请输入正确的手机号";
         isValid = false;
       }
@@ -376,23 +569,23 @@ const _sfc_main = {
     saveEducation() {
       this.resetEducationErrors();
       let isValid = true;
-      if (!this.educationForm.startTime) {
+      if (this.shouldValidateField("startTime", "education") && !this.educationForm.startTime) {
         this.educationErrors.startTime = "请选择开始时间";
         isValid = false;
       }
-      if (!this.educationForm.endTime) {
+      if (this.shouldValidateField("endTime", "education") && !this.educationForm.endTime) {
         this.educationErrors.endTime = "请选择结束时间";
         isValid = false;
       }
-      if (!this.educationForm.schoolName) {
+      if (this.shouldValidateField("schoolName", "education") && !this.educationForm.schoolName) {
         this.educationErrors.schoolName = "请输入学校名称";
         isValid = false;
       }
-      if (!this.educationForm.major) {
+      if (this.shouldValidateField("major", "education") && !this.educationForm.major) {
         this.educationErrors.major = "请输入专业";
         isValid = false;
       }
-      if (!this.educationForm.degree) {
+      if (this.shouldValidateField("degree", "education") && !this.educationForm.degree) {
         this.educationErrors.degree = "请选择学历";
         isValid = false;
       }
@@ -479,39 +672,39 @@ const _sfc_main = {
         supervisorPhone: ""
       };
       let isValid = true;
-      if (!this.workForm.startTime) {
+      if (this.shouldValidateField("startTime", "work") && !this.workForm.startTime) {
         this.workErrors.startTime = "请选择开始时间";
         isValid = false;
       }
-      if (!this.workForm.endTime) {
+      if (this.shouldValidateField("endTime", "work") && !this.workForm.endTime) {
         this.workErrors.endTime = "请选择结束时间";
         isValid = false;
       }
-      if (!this.workForm.companyName) {
+      if (this.shouldValidateField("companyName", "work") && !this.workForm.companyName) {
         this.workErrors.companyName = "请输入单位名称";
         isValid = false;
       }
-      if (!this.workForm.department) {
+      if (this.shouldValidateField("department", "work") && !this.workForm.department) {
         this.workErrors.department = "请输入任职部门";
         isValid = false;
       }
-      if (!this.workForm.position) {
+      if (this.shouldValidateField("position", "work") && !this.workForm.position) {
         this.workErrors.position = "请输入担任职务";
         isValid = false;
       }
-      if (!this.workForm.employeeCount) {
+      if (this.shouldValidateField("employeeCount", "work") && !this.workForm.employeeCount) {
         this.workErrors.employeeCount = "请输入单位人数";
         isValid = false;
       }
-      if (!this.workForm.monthlySalary) {
+      if (this.shouldValidateField("monthlySalary", "work") && !this.workForm.monthlySalary) {
         this.workErrors.monthlySalary = "请输入月薪";
         isValid = false;
       }
-      if (!this.workForm.supervisor) {
+      if (this.shouldValidateField("supervisor", "work") && !this.workForm.supervisor) {
         this.workErrors.supervisor = "请输入直属上级";
         isValid = false;
       }
-      if (!this.workForm.supervisorPhone) {
+      if (this.shouldValidateField("supervisorPhone", "work") && !this.workForm.supervisorPhone) {
         this.workErrors.supervisorPhone = "请输入直属上级电话";
         isValid = false;
       }
@@ -584,6 +777,7 @@ const _sfc_main = {
       });
     },
     submitForm() {
+      var _a, _b;
       if (!this.validateCurrentStep()) {
         return;
       }
@@ -597,10 +791,18 @@ const _sfc_main = {
       ];
       let isValid = true;
       allRequired.forEach((field) => {
-        if (!this.validateField(field, this.formData[field])) {
+        if (this.shouldValidateField(field) && !this.validateField(field, this.formData[field])) {
           isValid = false;
         }
       });
+      if (this.shouldValidateField("skills") && !((_a = this.formData.skills) == null ? void 0 : _a.trim())) {
+        this.formErrors.skills = "请描述您的专业技能";
+        isValid = false;
+      }
+      if (this.shouldValidateField("training") && !((_b = this.formData.training) == null ? void 0 : _b.trim())) {
+        this.formErrors.training = "请描述您的培训经历";
+        isValid = false;
+      }
       if (!isValid) {
         common_vendor.index.showToast({
           title: "请完善所有必填信息",
@@ -903,21 +1105,21 @@ const _sfc_main = {
         case 1:
           const basicFields = ["name", "gender", "phone", "idCard", "ethnic", "currentAddress"];
           basicFields.forEach((field) => {
-            if (!this.validateField(field, this.formData[field])) {
+            if (this.shouldValidateField(field) && !this.validateField(field, this.formData[field])) {
               isValid = false;
             }
           });
-          if (this.formData.gender === "女" && this.threePeriodIndex === -1) {
+          if (this.shouldValidateField("threePeriod") && this.formData.gender === "女" && this.threePeriodIndex === -1) {
             this.formErrors.threePeriod = "请选择三期状态";
             isValid = false;
           }
-          if (this.formData.height) {
+          if (this.shouldValidateField("height") && this.formData.height) {
             isValid = this.validateField("height", this.formData.height) && isValid;
           }
-          if (this.formData.weight) {
+          if (this.shouldValidateField("weight") && this.formData.weight) {
             isValid = this.validateField("weight", this.formData.weight) && isValid;
           }
-          if (this.formData.expectedSalary) {
+          if (this.shouldValidateField("expectedSalary") && this.formData.expectedSalary) {
             isValid = this.validateField("expectedSalary", this.formData.expectedSalary) && isValid;
           }
           break;
@@ -941,11 +1143,11 @@ const _sfc_main = {
           }
           break;
         case 6:
-          if (!((_a = this.formData.skills) == null ? void 0 : _a.trim())) {
+          if (this.shouldValidateField("skills") && !((_a = this.formData.skills) == null ? void 0 : _a.trim())) {
             this.formErrors.skills = "请描述您的专业技能";
             isValid = false;
           }
-          if (!((_b = this.formData.training) == null ? void 0 : _b.trim())) {
+          if (this.shouldValidateField("training") && !((_b = this.formData.training) == null ? void 0 : _b.trim())) {
             this.formErrors.training = "请描述您的培训经历";
             isValid = false;
           }
@@ -1114,12 +1316,15 @@ const _sfc_main = {
       const rule = this.validationRules[fieldName];
       if (!rule)
         return true;
+      if (!this.shouldValidateField(fieldName)) {
+        return true;
+      }
       this.formErrors[fieldName] = "";
       if (rule.required && !value) {
         this.formErrors[fieldName] = rule.message;
         return false;
       }
-      if (rule.pattern && !rule.pattern.test(value)) {
+      if (rule.pattern && value && !rule.pattern.test(value)) {
         this.formErrors[fieldName] = rule.message;
         return false;
       }
@@ -1260,7 +1465,7 @@ const _sfc_main = {
         }[this.currentStep];
         if (currentStepFields) {
           currentStepFields.forEach((field) => {
-            if (newVal[field] !== void 0) {
+            if (newVal[field] !== void 0 && this.shouldValidateField(field)) {
               this.validateField(field, newVal[field]);
             }
           });
@@ -1283,321 +1488,398 @@ function _sfc_render(_ctx, _cache, $props, $setup, $data, $options) {
   } : {}, {
     g: $data.currentStep === 1
   }, $data.currentStep === 1 ? common_vendor.e({
-    h: $data.formErrors.name ? 1 : "",
-    i: $data.formData.name,
-    j: common_vendor.o(($event) => $data.formData.name = $event.detail.value),
-    k: $data.formErrors.name
+    h: $options.showNameField
+  }, $options.showNameField ? common_vendor.e({
+    i: $data.formErrors.name ? 1 : "",
+    j: $data.formData.name,
+    k: common_vendor.o(($event) => $data.formData.name = $event.detail.value),
+    l: $data.formErrors.name
   }, $data.formErrors.name ? {
-    l: common_vendor.t($data.formErrors.name)
-  } : {}, {
-    m: common_vendor.t($data.genderOptions[$data.genderIndex] || "请选择性别"),
-    n: $data.formErrors.gender ? 1 : "",
-    o: common_vendor.o((...args) => $options.bindGenderChange && $options.bindGenderChange(...args)),
-    p: $data.genderIndex,
-    q: $data.genderOptions,
-    r: $data.formErrors.gender
+    m: common_vendor.t($data.formErrors.name)
+  } : {}) : {}, {
+    n: $options.showGenderField
+  }, $options.showGenderField ? common_vendor.e({
+    o: common_vendor.t($data.genderOptions[$data.genderIndex] || "请选择性别"),
+    p: $data.formErrors.gender ? 1 : "",
+    q: common_vendor.o((...args) => $options.bindGenderChange && $options.bindGenderChange(...args)),
+    r: $data.genderIndex,
+    s: $data.genderOptions,
+    t: $data.formErrors.gender
   }, $data.formErrors.gender ? {
-    s: common_vendor.t($data.formErrors.gender)
-  } : {}, {
-    t: $data.formData.gender === "女"
+    v: common_vendor.t($data.formErrors.gender)
+  } : {}) : {}, {
+    w: $data.formData.gender === "女"
   }, $data.formData.gender === "女" ? common_vendor.e({
-    v: common_vendor.t($data.threePeriodOptions[$data.threePeriodIndex] || "请选择"),
-    w: common_vendor.o((...args) => $options.bindThreePeriodChange && $options.bindThreePeriodChange(...args)),
-    x: $data.threePeriodIndex,
-    y: $data.threePeriodOptions,
-    z: $data.formErrors.threePeriod ? 1 : "",
-    A: $data.formErrors.threePeriod
+    x: common_vendor.t($data.threePeriodOptions[$data.threePeriodIndex] || "请选择"),
+    y: common_vendor.o((...args) => $options.bindThreePeriodChange && $options.bindThreePeriodChange(...args)),
+    z: $data.threePeriodIndex,
+    A: $data.threePeriodOptions,
+    B: $data.formErrors.threePeriod ? 1 : "",
+    C: $data.formErrors.threePeriod
   }, $data.formErrors.threePeriod ? {
-    B: common_vendor.t($data.formErrors.threePeriod)
+    D: common_vendor.t($data.formErrors.threePeriod)
   } : {}) : {}, {
-    C: $data.formErrors.phone ? 1 : "",
-    D: $data.formData.phone,
-    E: common_vendor.o(($event) => $data.formData.phone = $event.detail.value),
-    F: $data.formErrors.phone
+    E: $options.showPhoneField
+  }, $options.showPhoneField ? common_vendor.e({
+    F: $data.formErrors.phone ? 1 : "",
+    G: $data.formData.phone,
+    H: common_vendor.o(($event) => $data.formData.phone = $event.detail.value),
+    I: $data.formErrors.phone
   }, $data.formErrors.phone ? {
-    G: common_vendor.t($data.formErrors.phone)
-  } : {}, {
-    H: $data.formErrors.idCard ? 1 : "",
-    I: $data.formData.idCard,
-    J: common_vendor.o(($event) => $data.formData.idCard = $event.detail.value),
-    K: $data.formErrors.idCard
+    J: common_vendor.t($data.formErrors.phone)
+  } : {}) : {}, {
+    K: $options.showIdCardField
+  }, $options.showIdCardField ? common_vendor.e({
+    L: $data.formErrors.idCard ? 1 : "",
+    M: $data.formData.idCard,
+    N: common_vendor.o(($event) => $data.formData.idCard = $event.detail.value),
+    O: $data.formErrors.idCard
   }, $data.formErrors.idCard ? {
-    L: common_vendor.t($data.formErrors.idCard)
-  } : {}, {
-    M: common_vendor.t($data.ethnicOptions[$data.ethnicIndex] || "请选择民族"),
-    N: $data.formErrors.ethnic ? 1 : "",
-    O: common_vendor.o((...args) => $options.bindEthnicChange && $options.bindEthnicChange(...args)),
-    P: $data.ethnicIndex,
-    Q: $data.ethnicOptions,
-    R: $data.formErrors.ethnic
+    P: common_vendor.t($data.formErrors.idCard)
+  } : {}) : {}, {
+    Q: $options.showEthnicField
+  }, $options.showEthnicField ? common_vendor.e({
+    R: common_vendor.t($data.ethnicOptions[$data.ethnicIndex] || "请选择民族"),
+    S: $data.formErrors.ethnic ? 1 : "",
+    T: common_vendor.o((...args) => $options.bindEthnicChange && $options.bindEthnicChange(...args)),
+    U: $data.ethnicIndex,
+    V: $data.ethnicOptions,
+    W: $data.formErrors.ethnic
   }, $data.formErrors.ethnic ? {
-    S: common_vendor.t($data.formErrors.ethnic)
+    X: common_vendor.t($data.formErrors.ethnic)
+  } : {}) : {}, {
+    Y: $options.showHeightField
+  }, $options.showHeightField ? {
+    Z: $data.formData.height,
+    aa: common_vendor.o(($event) => $data.formData.height = $event.detail.value)
+  } : {}, {
+    ab: $options.showWeightField
+  }, $options.showWeightField ? {
+    ac: $data.formData.weight,
+    ad: common_vendor.o(($event) => $data.formData.weight = $event.detail.value)
   } : {}, {
-    T: $data.formData.height,
-    U: common_vendor.o(($event) => $data.formData.height = $event.detail.value),
-    V: $data.formData.weight,
-    W: common_vendor.o(($event) => $data.formData.weight = $event.detail.value),
-    X: $data.formErrors.currentAddress ? 1 : "",
-    Y: $data.formData.currentAddress,
-    Z: common_vendor.o(($event) => $data.formData.currentAddress = $event.detail.value),
-    aa: $data.formErrors.currentAddress
+    ae: $data.formErrors.currentAddress ? 1 : "",
+    af: $data.formData.currentAddress,
+    ag: common_vendor.o(($event) => $data.formData.currentAddress = $event.detail.value),
+    ah: $data.formErrors.currentAddress
   }, $data.formErrors.currentAddress ? {
-    ab: common_vendor.t($data.formErrors.currentAddress)
+    ai: common_vendor.t($data.formErrors.currentAddress)
   } : {}, {
-    ac: $data.formData.residence,
-    ad: common_vendor.o(($event) => $data.formData.residence = $event.detail.value),
-    ae: common_vendor.t($data.marriageOptions[$data.marriageIndex] || "请选择婚育状况"),
-    af: common_vendor.o((...args) => $options.bindMarriageChange && $options.bindMarriageChange(...args)),
-    ag: $data.marriageIndex,
-    ah: $data.marriageOptions,
-    ai: $data.formData.expectedSalary,
-    aj: common_vendor.o(($event) => $data.formData.expectedSalary = $event.detail.value)
+    aj: $data.formData.residence,
+    ak: common_vendor.o(($event) => $data.formData.residence = $event.detail.value),
+    al: common_vendor.t($data.marriageOptions[$data.marriageIndex] || "请选择婚育状况"),
+    am: common_vendor.o((...args) => $options.bindMarriageChange && $options.bindMarriageChange(...args)),
+    an: $data.marriageIndex,
+    ao: $data.marriageOptions,
+    ap: $data.formData.expectedSalary,
+    aq: common_vendor.o(($event) => $data.formData.expectedSalary = $event.detail.value)
   }) : {}, {
-    ak: $data.currentStep === 3
+    ar: $data.currentStep === 3
   }, $data.currentStep === 3 ? common_vendor.e({
-    al: $data.familyMembers.length > 0
+    as: $data.familyMembers.length > 0
   }, $data.familyMembers.length > 0 ? {
-    am: common_vendor.f($data.familyMembers, (member, index, i0) => {
-      return {
+    at: common_vendor.f($data.familyMembers, (member, index, i0) => {
+      return common_vendor.e({
         a: common_vendor.t(index + 1),
         b: common_vendor.o(($event) => $options.editFamilyMember(index), index),
-        c: common_vendor.o(($event) => $options.deleteFamilyMember(index), index),
-        d: common_vendor.t(member.relation),
-        e: common_vendor.t(member.name),
-        f: common_vendor.t(member.workplaceOrAddress),
-        g: common_vendor.t(member.position),
-        h: common_vendor.t(member.phone),
+        c: common_vendor.o(($event) => $options.deleteFamilyMember(index), index)
+      }, $options.showFamilyRelationField ? {
+        d: common_vendor.t(member.relation)
+      } : {}, $options.showFamilyNameField ? {
+        e: common_vendor.t(member.name)
+      } : {}, $options.showFamilyWorkplaceField ? {
+        f: common_vendor.t(member.workplaceOrAddress)
+      } : {}, $options.showFamilyPositionField ? {
+        g: common_vendor.t(member.position)
+      } : {}, $options.showFamilyPhoneField ? {
+        h: common_vendor.t(member.phone)
+      } : {}, {
         i: common_vendor.t(member.isEmergencyContact ? "是" : "否"),
         j: index
-      };
-    })
+      });
+    }),
+    av: $options.showFamilyRelationField,
+    aw: $options.showFamilyNameField,
+    ax: $options.showFamilyWorkplaceField,
+    ay: $options.showFamilyPositionField,
+    az: $options.showFamilyPhoneField
   } : {}, {
-    an: common_vendor.t($data.isEditing ? "编辑家庭成员" : "添加家庭成员"),
-    ao: $data.isEditing
+    aA: common_vendor.t($data.isEditing ? "编辑家庭成员" : "添加家庭成员"),
+    aB: $data.isEditing
   }, $data.isEditing ? {
-    ap: common_vendor.o((...args) => $options.cancelEdit && $options.cancelEdit(...args))
+    aC: common_vendor.o((...args) => $options.cancelEdit && $options.cancelEdit(...args))
   } : {}, {
-    aq: $data.familyMemberErrors.relation ? 1 : "",
-    ar: $data.familyMemberForm.relation,
-    as: common_vendor.o(($event) => $data.familyMemberForm.relation = $event.detail.value),
-    at: $data.familyMemberErrors.relation
+    aD: $options.showFamilyRelationField
+  }, $options.showFamilyRelationField ? common_vendor.e({
+    aE: $data.familyMemberErrors.relation ? 1 : "",
+    aF: $data.familyMemberForm.relation,
+    aG: common_vendor.o(($event) => $data.familyMemberForm.relation = $event.detail.value),
+    aH: $data.familyMemberErrors.relation
   }, $data.familyMemberErrors.relation ? {
-    av: common_vendor.t($data.familyMemberErrors.relation)
-  } : {}, {
-    aw: $data.familyMemberErrors.name ? 1 : "",
-    ax: $data.familyMemberForm.name,
-    ay: common_vendor.o(($event) => $data.familyMemberForm.name = $event.detail.value),
-    az: $data.familyMemberErrors.name
+    aI: common_vendor.t($data.familyMemberErrors.relation)
+  } : {}) : {}, {
+    aJ: $options.showFamilyNameField
+  }, $options.showFamilyNameField ? common_vendor.e({
+    aK: $data.familyMemberErrors.name ? 1 : "",
+    aL: $data.familyMemberForm.name,
+    aM: common_vendor.o(($event) => $data.familyMemberForm.name = $event.detail.value),
+    aN: $data.familyMemberErrors.name
   }, $data.familyMemberErrors.name ? {
-    aA: common_vendor.t($data.familyMemberErrors.name)
+    aO: common_vendor.t($data.familyMemberErrors.name)
+  } : {}) : {}, {
+    aP: $options.showFamilyWorkplaceField
+  }, $options.showFamilyWorkplaceField ? {
+    aQ: $data.familyMemberForm.workplaceOrAddress,
+    aR: common_vendor.o(($event) => $data.familyMemberForm.workplaceOrAddress = $event.detail.value)
   } : {}, {
-    aB: $data.familyMemberForm.workplaceOrAddress,
-    aC: common_vendor.o(($event) => $data.familyMemberForm.workplaceOrAddress = $event.detail.value),
-    aD: $data.familyMemberForm.position,
-    aE: common_vendor.o(($event) => $data.familyMemberForm.position = $event.detail.value),
-    aF: $data.familyMemberErrors.phone ? 1 : "",
-    aG: $data.familyMemberForm.phone,
-    aH: common_vendor.o(($event) => $data.familyMemberForm.phone = $event.detail.value),
-    aI: $data.familyMemberErrors.phone
-  }, $data.familyMemberErrors.phone ? {
-    aJ: common_vendor.t($data.familyMemberErrors.phone)
+    aS: $options.showFamilyPositionField
+  }, $options.showFamilyPositionField ? {
+    aT: $data.familyMemberForm.position,
+    aU: common_vendor.o(($event) => $data.familyMemberForm.position = $event.detail.value)
   } : {}, {
-    aK: $data.familyMemberForm.isEmergencyContact,
-    aL: common_vendor.o((...args) => $options.handleEmergencyContactChange && $options.handleEmergencyContactChange(...args)),
-    aM: common_vendor.t($data.isEditing ? "✓" : "+"),
-    aN: common_vendor.o((...args) => $options.saveFamilyMember && $options.saveFamilyMember(...args)),
-    aO: common_vendor.t($data.isEditing ? "保存修改" : "添加成员")
+    aV: $options.showFamilyPhoneField
+  }, $options.showFamilyPhoneField ? common_vendor.e({
+    aW: $data.familyMemberErrors.phone ? 1 : "",
+    aX: $data.familyMemberForm.phone,
+    aY: common_vendor.o(($event) => $data.familyMemberForm.phone = $event.detail.value),
+    aZ: $data.familyMemberErrors.phone
+  }, $data.familyMemberErrors.phone ? {
+    ba: common_vendor.t($data.familyMemberErrors.phone)
+  } : {}) : {}, {
+    bb: $data.familyMemberForm.isEmergencyContact,
+    bc: common_vendor.o((...args) => $options.handleEmergencyContactChange && $options.handleEmergencyContactChange(...args)),
+    bd: common_vendor.t($data.isEditing ? "✓" : "+"),
+    be: common_vendor.o((...args) => $options.saveFamilyMember && $options.saveFamilyMember(...args)),
+    bf: common_vendor.t($data.isEditing ? "保存修改" : "添加成员")
   }) : {}, {
-    aP: $data.currentStep === 5
+    bg: $data.currentStep === 5
   }, $data.currentStep === 5 ? common_vendor.e({
-    aQ: $data.educationList.length > 0
+    bh: $data.educationList.length > 0
   }, $data.educationList.length > 0 ? {
-    aR: common_vendor.f($data.educationList, (edu, index, i0) => {
-      return {
+    bi: common_vendor.f($data.educationList, (edu, index, i0) => {
+      return common_vendor.e({
         a: common_vendor.t(index === 0 ? "第一学历" : "最高学历"),
         b: common_vendor.o(($event) => $options.editEducation(index), index),
-        c: common_vendor.o(($event) => $options.deleteEducation(index), index),
+        c: common_vendor.o(($event) => $options.deleteEducation(index), index)
+      }, $options.showEducationTimeField ? {
         d: common_vendor.t(edu.startTime),
-        e: common_vendor.t(edu.endTime),
-        f: common_vendor.t(edu.schoolName),
-        g: common_vendor.t(edu.major),
-        h: common_vendor.t(edu.degree),
+        e: common_vendor.t(edu.endTime)
+      } : {}, $options.showEducationSchoolField ? {
+        f: common_vendor.t(edu.schoolName)
+      } : {}, $options.showEducationMajorField ? {
+        g: common_vendor.t(edu.major)
+      } : {}, $options.showEducationDegreeField ? {
+        h: common_vendor.t(edu.degree)
+      } : {}, {
         i: index
-      };
-    })
+      });
+    }),
+    bj: $options.showEducationTimeField,
+    bk: $options.showEducationSchoolField,
+    bl: $options.showEducationMajorField,
+    bm: $options.showEducationDegreeField
   } : {}, {
-    aS: $data.educationList.length < 2 || $data.isEditingEducation
+    bn: $data.educationList.length < 2 || $data.isEditingEducation
   }, $data.educationList.length < 2 || $data.isEditingEducation ? common_vendor.e({
-    aT: common_vendor.t($data.isEditingEducation ? "编辑教育经历" : $data.educationList.length === 0 ? "添加第一学历" : "添加最高学历"),
-    aU: $data.isEditingEducation
+    bo: common_vendor.t($data.isEditingEducation ? "编辑教育经历" : $data.educationList.length === 0 ? "添加第一学历" : "添加最高学历"),
+    bp: $data.isEditingEducation
   }, $data.isEditingEducation ? {
-    aV: common_vendor.o((...args) => $options.cancelEditEducation && $options.cancelEditEducation(...args))
+    bq: common_vendor.o((...args) => $options.cancelEditEducation && $options.cancelEditEducation(...args))
   } : {}, {
-    aW: common_vendor.t($data.educationForm.startTime || "开始时间"),
-    aX: $data.educationForm.startTime,
-    aY: common_vendor.o((...args) => $options.bindStartTimeChange && $options.bindStartTimeChange(...args)),
-    aZ: $data.educationErrors.startTime ? 1 : "",
-    ba: common_vendor.t($data.educationForm.endTime || "结束时间"),
-    bb: $data.educationForm.endTime,
-    bc: common_vendor.o((...args) => $options.bindEndTimeChange && $options.bindEndTimeChange(...args)),
-    bd: $data.educationErrors.endTime ? 1 : "",
-    be: $data.educationErrors.startTime
+    br: $options.showEducationTimeField
+  }, $options.showEducationTimeField ? common_vendor.e({
+    bs: common_vendor.t($data.educationForm.startTime || "开始时间"),
+    bt: $data.educationForm.startTime,
+    bv: common_vendor.o((...args) => $options.bindStartTimeChange && $options.bindStartTimeChange(...args)),
+    bw: $data.educationErrors.startTime ? 1 : "",
+    bx: common_vendor.t($data.educationForm.endTime || "结束时间"),
+    by: $data.educationForm.endTime,
+    bz: common_vendor.o((...args) => $options.bindEndTimeChange && $options.bindEndTimeChange(...args)),
+    bA: $data.educationErrors.endTime ? 1 : "",
+    bB: $data.educationErrors.startTime
   }, $data.educationErrors.startTime ? {
-    bf: common_vendor.t($data.educationErrors.startTime)
+    bC: common_vendor.t($data.educationErrors.startTime)
   } : {}, {
-    bg: $data.educationErrors.endTime
+    bD: $data.educationErrors.endTime
   }, $data.educationErrors.endTime ? {
-    bh: common_vendor.t($data.educationErrors.endTime)
-  } : {}, {
-    bi: $data.educationErrors.schoolName ? 1 : "",
-    bj: $data.educationForm.schoolName,
-    bk: common_vendor.o(($event) => $data.educationForm.schoolName = $event.detail.value),
-    bl: $data.educationErrors.schoolName
+    bE: common_vendor.t($data.educationErrors.endTime)
+  } : {}) : {}, {
+    bF: $options.showEducationSchoolField
+  }, $options.showEducationSchoolField ? common_vendor.e({
+    bG: $data.educationErrors.schoolName ? 1 : "",
+    bH: $data.educationForm.schoolName,
+    bI: common_vendor.o(($event) => $data.educationForm.schoolName = $event.detail.value),
+    bJ: $data.educationErrors.schoolName
   }, $data.educationErrors.schoolName ? {
-    bm: common_vendor.t($data.educationErrors.schoolName)
-  } : {}, {
-    bn: $data.educationErrors.major ? 1 : "",
-    bo: $data.educationForm.major,
-    bp: common_vendor.o(($event) => $data.educationForm.major = $event.detail.value),
-    bq: $data.educationErrors.major
+    bK: common_vendor.t($data.educationErrors.schoolName)
+  } : {}) : {}, {
+    bL: $options.showEducationMajorField
+  }, $options.showEducationMajorField ? common_vendor.e({
+    bM: $data.educationErrors.major ? 1 : "",
+    bN: $data.educationForm.major,
+    bO: common_vendor.o(($event) => $data.educationForm.major = $event.detail.value),
+    bP: $data.educationErrors.major
   }, $data.educationErrors.major ? {
-    br: common_vendor.t($data.educationErrors.major)
-  } : {}, {
-    bs: common_vendor.t($data.degreeOptions[$data.degreeIndex] || "请选择学历"),
-    bt: common_vendor.o((...args) => $options.bindDegreeChange && $options.bindDegreeChange(...args)),
-    bv: $data.degreeIndex,
-    bw: $data.degreeOptions,
-    bx: $data.educationErrors.degree ? 1 : "",
-    by: $data.educationErrors.degree
+    bQ: common_vendor.t($data.educationErrors.major)
+  } : {}) : {}, {
+    bR: $options.showEducationDegreeField
+  }, $options.showEducationDegreeField ? common_vendor.e({
+    bS: common_vendor.t($data.degreeOptions[$data.degreeIndex] || "请选择学历"),
+    bT: common_vendor.o((...args) => $options.bindDegreeChange && $options.bindDegreeChange(...args)),
+    bU: $data.degreeIndex,
+    bV: $data.degreeOptions,
+    bW: $data.educationErrors.degree ? 1 : "",
+    bX: $data.educationErrors.degree
   }, $data.educationErrors.degree ? {
-    bz: common_vendor.t($data.educationErrors.degree)
-  } : {}, {
-    bA: common_vendor.t($data.isEditingEducation ? "✓" : "+"),
-    bB: common_vendor.o((...args) => $options.saveEducation && $options.saveEducation(...args)),
-    bC: common_vendor.t($data.isEditingEducation ? "保存修改" : "添加学历")
+    bY: common_vendor.t($data.educationErrors.degree)
+  } : {}) : {}, {
+    bZ: common_vendor.t($data.isEditingEducation ? "✓" : "+"),
+    ca: common_vendor.o((...args) => $options.saveEducation && $options.saveEducation(...args)),
+    cb: common_vendor.t($data.isEditingEducation ? "保存修改" : "添加学历")
   }) : {}) : {}, {
-    bD: $data.currentStep === 6
+    cc: $data.currentStep === 6
   }, $data.currentStep === 6 ? common_vendor.e({
-    bE: $data.formErrors.skills ? 1 : "",
-    bF: $data.formData.skills,
-    bG: common_vendor.o(($event) => $data.formData.skills = $event.detail.value),
-    bH: $data.formErrors.skills
+    cd: $data.formErrors.skills ? 1 : "",
+    ce: $data.formData.skills,
+    cf: common_vendor.o(($event) => $data.formData.skills = $event.detail.value),
+    cg: $data.formErrors.skills
   }, $data.formErrors.skills ? {
-    bI: common_vendor.t($data.formErrors.skills)
+    ch: common_vendor.t($data.formErrors.skills)
   } : {}, {
-    bJ: $data.formErrors.training ? 1 : "",
-    bK: $data.formData.training,
-    bL: common_vendor.o(($event) => $data.formData.training = $event.detail.value),
-    bM: $data.formErrors.training
+    ci: $data.formErrors.training ? 1 : "",
+    cj: $data.formData.training,
+    ck: common_vendor.o(($event) => $data.formData.training = $event.detail.value),
+    cl: $data.formErrors.training
   }, $data.formErrors.training ? {
-    bN: common_vendor.t($data.formErrors.training)
+    cm: common_vendor.t($data.formErrors.training)
   } : {}) : {}, {
-    bO: $data.currentStep === 8
+    cn: $data.currentStep === 8
   }, $data.currentStep === 8 ? common_vendor.e({
-    bP: $data.workList.length > 0
+    co: $data.workList.length > 0
   }, $data.workList.length > 0 ? {
-    bQ: common_vendor.f($data.workList, (work, index, i0) => {
-      return {
+    cp: common_vendor.f($data.workList, (work, index, i0) => {
+      return common_vendor.e({
         a: common_vendor.t(index + 1),
         b: common_vendor.o(($event) => $options.editWork(index), index),
-        c: common_vendor.o(($event) => $options.deleteWork(index), index),
+        c: common_vendor.o(($event) => $options.deleteWork(index), index)
+      }, $options.showWorkTimeField ? {
         d: common_vendor.t(work.startTime),
-        e: common_vendor.t(work.endTime),
-        f: common_vendor.t(work.companyName),
-        g: common_vendor.t(work.department),
-        h: common_vendor.t(work.employeeCount),
-        i: common_vendor.t(work.position),
+        e: common_vendor.t(work.endTime)
+      } : {}, $options.showWorkCompanyField ? {
+        f: common_vendor.t(work.companyName)
+      } : {}, $options.showWorkDepartmentField ? {
+        g: common_vendor.t(work.department)
+      } : {}, $options.showWorkEmployeeCountField ? {
+        h: common_vendor.t(work.employeeCount)
+      } : {}, $options.showWorkPositionField ? {
+        i: common_vendor.t(work.position)
+      } : {}, {
         j: common_vendor.t(work.monthlySalary),
         k: common_vendor.t(work.supervisor),
         l: common_vendor.t(work.supervisorPhone),
         m: index
-      };
-    })
+      });
+    }),
+    cq: $options.showWorkTimeField,
+    cr: $options.showWorkCompanyField,
+    cs: $options.showWorkDepartmentField,
+    ct: $options.showWorkEmployeeCountField,
+    cv: $options.showWorkPositionField
   } : {}, {
-    bR: $data.workList.length < 2 || $data.isEditingWork
+    cw: $data.workList.length < 2 || $data.isEditingWork
   }, $data.workList.length < 2 || $data.isEditingWork ? common_vendor.e({
-    bS: common_vendor.t($data.isEditingWork ? "编辑工作经历" : "添加工作经历"),
-    bT: $data.isEditingWork
+    cx: common_vendor.t($data.isEditingWork ? "编辑工作经历" : "添加工作经历"),
+    cy: $data.isEditingWork
   }, $data.isEditingWork ? {
-    bU: common_vendor.o((...args) => $options.cancelEditWork && $options.cancelEditWork(...args))
+    cz: common_vendor.o((...args) => $options.cancelEditWork && $options.cancelEditWork(...args))
   } : {}, {
-    bV: common_vendor.t($data.workForm.startTime || "开始时间"),
-    bW: $data.workForm.startTime,
-    bX: common_vendor.o((...args) => $options.bindWorkStartTimeChange && $options.bindWorkStartTimeChange(...args)),
-    bY: $data.workErrors.startTime ? 1 : "",
-    bZ: common_vendor.t($data.workForm.endTime || "结束时间"),
-    ca: $data.workForm.endTime,
-    cb: common_vendor.o((...args) => $options.bindWorkEndTimeChange && $options.bindWorkEndTimeChange(...args)),
-    cc: $data.workErrors.endTime ? 1 : "",
-    cd: $data.workErrors.startTime
+    cA: $options.showWorkTimeField
+  }, $options.showWorkTimeField ? common_vendor.e({
+    cB: common_vendor.t($data.workForm.startTime || "开始时间"),
+    cC: $data.workForm.startTime,
+    cD: common_vendor.o((...args) => $options.bindWorkStartTimeChange && $options.bindWorkStartTimeChange(...args)),
+    cE: $data.workErrors.startTime ? 1 : "",
+    cF: common_vendor.t($data.workForm.endTime || "结束时间"),
+    cG: $data.workForm.endTime,
+    cH: common_vendor.o((...args) => $options.bindWorkEndTimeChange && $options.bindWorkEndTimeChange(...args)),
+    cI: $data.workErrors.endTime ? 1 : "",
+    cJ: $data.workErrors.startTime
   }, $data.workErrors.startTime ? {
-    ce: common_vendor.t($data.workErrors.startTime)
+    cK: common_vendor.t($data.workErrors.startTime)
   } : {}, {
-    cf: $data.workErrors.endTime
+    cL: $data.workErrors.endTime
   }, $data.workErrors.endTime ? {
-    cg: common_vendor.t($data.workErrors.endTime)
-  } : {}, {
-    ch: $data.workErrors.companyName ? 1 : "",
-    ci: $data.workForm.companyName,
-    cj: common_vendor.o(($event) => $data.workForm.companyName = $event.detail.value),
-    ck: $data.workErrors.companyName
+    cM: common_vendor.t($data.workErrors.endTime)
+  } : {}) : {}, {
+    cN: $options.showWorkCompanyField
+  }, $options.showWorkCompanyField ? common_vendor.e({
+    cO: $data.workErrors.companyName ? 1 : "",
+    cP: $data.workForm.companyName,
+    cQ: common_vendor.o(($event) => $data.workForm.companyName = $event.detail.value),
+    cR: $data.workErrors.companyName
   }, $data.workErrors.companyName ? {
-    cl: common_vendor.t($data.workErrors.companyName)
-  } : {}, {
-    cm: $data.workErrors.employeeCount ? 1 : "",
-    cn: $data.workForm.employeeCount,
-    co: common_vendor.o(($event) => $data.workForm.employeeCount = $event.detail.value),
-    cp: $data.workErrors.employeeCount
+    cS: common_vendor.t($data.workErrors.companyName)
+  } : {}) : {}, {
+    cT: $options.showWorkEmployeeCountField
+  }, $options.showWorkEmployeeCountField ? common_vendor.e({
+    cU: $data.workErrors.employeeCount ? 1 : "",
+    cV: $data.workForm.employeeCount,
+    cW: common_vendor.o(($event) => $data.workForm.employeeCount = $event.detail.value),
+    cX: $data.workErrors.employeeCount
   }, $data.workErrors.employeeCount ? {
-    cq: common_vendor.t($data.workErrors.employeeCount)
-  } : {}, {
-    cr: $data.workErrors.department ? 1 : "",
-    cs: $data.workForm.department,
-    ct: common_vendor.o(($event) => $data.workForm.department = $event.detail.value),
-    cv: $data.workErrors.department
+    cY: common_vendor.t($data.workErrors.employeeCount)
+  } : {}) : {}, {
+    cZ: $options.showWorkDepartmentField
+  }, $options.showWorkDepartmentField ? common_vendor.e({
+    da: $data.workErrors.department ? 1 : "",
+    db: $data.workForm.department,
+    dc: common_vendor.o(($event) => $data.workForm.department = $event.detail.value),
+    dd: $data.workErrors.department
   }, $data.workErrors.department ? {
-    cw: common_vendor.t($data.workErrors.department)
-  } : {}, {
-    cx: $data.workErrors.position ? 1 : "",
-    cy: $data.workForm.position,
-    cz: common_vendor.o(($event) => $data.workForm.position = $event.detail.value),
-    cA: $data.workErrors.position
+    de: common_vendor.t($data.workErrors.department)
+  } : {}) : {}, {
+    df: $options.showWorkPositionField
+  }, $options.showWorkPositionField ? common_vendor.e({
+    dg: $data.workErrors.position ? 1 : "",
+    dh: $data.workForm.position,
+    di: common_vendor.o(($event) => $data.workForm.position = $event.detail.value),
+    dj: $data.workErrors.position
   }, $data.workErrors.position ? {
-    cB: common_vendor.t($data.workErrors.position)
-  } : {}, {
-    cC: $data.workForm.monthlySalary,
-    cD: common_vendor.o(($event) => $data.workForm.monthlySalary = $event.detail.value),
-    cE: $data.workErrors.monthlySalary
+    dk: common_vendor.t($data.workErrors.position)
+  } : {}) : {}, {
+    dl: $data.workForm.monthlySalary,
+    dm: common_vendor.o(($event) => $data.workForm.monthlySalary = $event.detail.value),
+    dn: $data.workErrors.monthlySalary
   }, $data.workErrors.monthlySalary ? {
-    cF: common_vendor.t($data.workErrors.monthlySalary)
+    dp: common_vendor.t($data.workErrors.monthlySalary)
   } : {}, {
-    cG: $data.workForm.supervisor,
-    cH: common_vendor.o(($event) => $data.workForm.supervisor = $event.detail.value),
-    cI: $data.workErrors.supervisor
+    dq: $data.workForm.supervisor,
+    dr: common_vendor.o(($event) => $data.workForm.supervisor = $event.detail.value),
+    ds: $data.workErrors.supervisor
   }, $data.workErrors.supervisor ? {
-    cJ: common_vendor.t($data.workErrors.supervisor)
+    dt: common_vendor.t($data.workErrors.supervisor)
   } : {}, {
-    cK: $data.workForm.supervisorPhone,
-    cL: common_vendor.o(($event) => $data.workForm.supervisorPhone = $event.detail.value),
-    cM: $data.workErrors.supervisorPhone
+    dv: $data.workForm.supervisorPhone,
+    dw: common_vendor.o(($event) => $data.workForm.supervisorPhone = $event.detail.value),
+    dx: $data.workErrors.supervisorPhone
   }, $data.workErrors.supervisorPhone ? {
-    cN: common_vendor.t($data.workErrors.supervisorPhone)
+    dy: common_vendor.t($data.workErrors.supervisorPhone)
   } : {}, {
-    cO: common_vendor.t($data.isEditingWork ? "✓" : "+"),
-    cP: common_vendor.o((...args) => $options.saveWork && $options.saveWork(...args)),
-    cQ: common_vendor.t($data.isEditingWork ? "保存修改" : "添加工作经历")
+    dz: common_vendor.t($data.isEditingWork ? "✓" : "+"),
+    dA: common_vendor.o((...args) => $options.saveWork && $options.saveWork(...args)),
+    dB: common_vendor.t($data.isEditingWork ? "保存修改" : "添加工作经历")
   }) : {}) : {}, {
-    cR: $options.showPrevButton
+    dC: $options.showPrevButton
   }, $options.showPrevButton ? {
-    cS: common_vendor.o((...args) => $options.prevStep && $options.prevStep(...args))
+    dD: common_vendor.o((...args) => $options.prevStep && $options.prevStep(...args))
   } : {}, {
-    cT: $options.showNextButton
+    dE: $options.showNextButton
   }, $options.showNextButton ? {
-    cU: common_vendor.o((...args) => $options.nextStep && $options.nextStep(...args))
+    dF: common_vendor.o((...args) => $options.nextStep && $options.nextStep(...args))
   } : {}, {
-    cV: $options.showSubmitButton
+    dG: $options.showSubmitButton
   }, $options.showSubmitButton ? {
-    cW: common_vendor.o((...args) => $options.submitForm && $options.submitForm(...args))
+    dH: common_vendor.o((...args) => $options.submitForm && $options.submitForm(...args))
   } : {});
 }
 const MiniProgramPage = /* @__PURE__ */ common_vendor._export_sfc(_sfc_main, [["render", _sfc_render]]);

Dosya farkı çok büyük olduğundan ihmal edildi
+ 0 - 0
unpackage/dist/dev/mp-weixin/pages/Personal/Personal.wxml


+ 13 - 2
unpackage/dist/dev/mp-weixin/pages/identity-verify/identity-verify.js

@@ -42,8 +42,19 @@ const _sfc_main = {
       // 其他属性保持不变...
       questions: [],
       // 添加新属性存储API返回的问题数据
-      introVideoUrl: "https://data.qicai321.com/minlong/ee4d9cce-c3d5-4350-8c6e-684283827897.mp4",
-      // 保留介绍视频
+      introVideoUrl: (() => {
+        try {
+          const configStr = common_vendor.index.getStorageSync("configData");
+          if (configStr && configStr.trim()) {
+            return JSON.parse(configStr).digital_human_opening_video_url || "https://data.qicai321.com/minlong/ee4d9cce-c3d5-4350-8c6e-684283827897.mp4";
+          }
+          return "https://data.qicai321.com/minlong/ee4d9cce-c3d5-4350-8c6e-684283827897.mp4";
+        } catch (error) {
+          console.warn("解析配置数据失败:", error);
+          return {};
+        }
+      })(),
+      //'https://data.qicai321.com/minlong/ee4d9cce-c3d5-4350-8c6e-684283827897.mp4', // 保留介绍视频
       isRecording: false,
       recordingTimer: null,
       showStopRecordingButton: false,

+ 31 - 0
unpackage/dist/dev/mp-weixin/pages/index/index.js

@@ -187,6 +187,36 @@ const _sfc_main = {
       common_vendor.index.setStorageSync("selectedJob", JSON.stringify(job));
       console.log("已选择职位:", job.id, job.title);
     },
+    // 获取当前职位配置
+    getConfig() {
+      common_vendor.index.request({
+        url: `${common_config.apiBaseUrl}/api/job/config/position/${this.selectedJobId}`,
+        method: "GET",
+        data: {
+          openid: JSON.parse(common_vendor.index.getStorageSync("userInfo")).openid
+        },
+        header: {
+          "content-type": "application/x-www-form-urlencoded"
+        },
+        success: (res) => {
+          console.log(res);
+          if (res.statusCode === 200) {
+            if (res.data.code === 2e3) {
+              common_vendor.index.setStorageSync("configData", JSON.stringify(res.data.data));
+            }
+          } else {
+            common_vendor.index.hideLoading();
+          }
+        },
+        fail: (err) => {
+          common_vendor.index.hideLoading();
+          common_vendor.index.showToast({
+            title: "网络错误,请稍后重试",
+            icon: "none"
+          });
+        }
+      });
+    },
     applyForJob() {
       if (!this.checkLogin()) {
         return;
@@ -214,6 +244,7 @@ const _sfc_main = {
             console.error("更新用户信息失败:", e);
           }
         }
+        this.getConfig();
         common_vendor.index.navigateTo({
           url: "/pages/Personal/Personal",
           fail: (err) => {

+ 1 - 1
unpackage/dist/dev/mp-weixin/project.config.json

@@ -18,7 +18,7 @@
     }
   },
   "compileType": "miniprogram",
-  "libVersion": "3.8.7",
+  "libVersion": "3.8.8",
   "appid": "wxc9655eeaa3223b75",
   "projectname": "interview_uni",
   "condition": {

Bu fark içinde çok fazla dosya değişikliği olduğu için bazı dosyalar gösterilmiyor