yangg преди 2 месеца
родител
ревизия
053676cf42

+ 233 - 0
pages/Personal/Personal.vue

@@ -1,5 +1,11 @@
 <template>
 	<view class="personal-container">
+		<!-- Add loading indicator -->
+		<view class="loading-container" v-if="isLoading">
+			<view class="loading-spinner"></view>
+			<text class="loading-text">加载中...</text>
+		</view>
+		
 		<!-- 添加承诺书弹框 -->
 		<view class="promise-modal" v-if="showPromiseModal">
 			<view class="promise-content">
@@ -686,8 +692,14 @@ import { apiBaseUrl } from '@/common/config.js';
 					idCard: '',
 					phone: ''
 				},
+				// Add loading state
+				isLoading: true,
 			}
 		},
+		onLoad() {
+			// Fetch user data when component loads
+			this.fetchUserData();
+		},
 		methods: {
 			// 添加承诺书相关方法
 			togglePromiseChecked() {
@@ -1528,6 +1540,192 @@ import { apiBaseUrl } from '@/common/config.js';
 						return true;
 				}
 			},
+			// Add method to fetch user data
+			fetchUserData() {
+				this.isLoading = true;
+				
+				// Get openid from storage
+				const userInfo = uni.getStorageSync('userInfo') ? JSON.parse(uni.getStorageSync('userInfo')) : {};
+				const openid = userInfo.openid;
+				
+				if (!openid) {
+					uni.showToast({
+						title: '用户信息获取失败,请重新登录',
+						icon: 'none'
+					});
+					this.isLoading = false;
+					return;
+				}
+				
+				uni.request({
+					url: `${apiBaseUrl}/api/wechat/user/get_full_info?tenant_id=1&openid=${openid}`,
+					method: 'GET',
+					success: (res) => {
+						/* if (res.data.code === 2000) { */
+							// Successfully fetched data
+							this.populateFormData(res.data.data);
+						/* } else {
+							uni.showToast({
+								title: res.data.msg || '获取用户信息失败',
+								icon: 'none'
+							});
+						} */
+					},
+					fail: (err) => {
+						/* console.error('获取用户信息失败:', err);
+						uni.showToast({
+							title: '网络错误,请检查网络连接',
+							icon: 'none'
+						}); */
+					},
+					complete: () => {
+						this.isLoading = false;
+					}
+				});
+			},
+			
+			// Add method to populate form data with fetched data
+			populateFormData(data) {
+				const { user_info, profile, educations, work_experiences, family_members } = data;
+				
+				// Populate basic user info
+				if (user_info) {
+					this.formData.name = user_info.name || '';
+					this.formData.gender = user_info.gender_text || '';
+					this.genderIndex = this.genderOptions.findIndex(item => item === this.formData.gender);
+					this.formData.idCard = user_info.id_card || '';
+					this.formData.phone = user_info.phone || '';
+					this.formData.email = user_info.email || '';
+				}
+				
+				// Populate profile data
+				if (profile) {
+					// Set political status
+					this.formData.political = profile.political_status || '';
+					this.politicalIndex = this.politicalOptions.findIndex(item => item === this.formData.political);
+					
+					// Set ethnic
+					this.formData.ethnic = profile.ethnicity || '';
+					this.ethnicIndex = this.ethnicOptions.findIndex(item => item === this.formData.ethnic);
+					
+					// Set height and weight
+					this.formData.height = profile.height || '';
+					this.formData.weight = profile.weight || '';
+					
+					// Set native place and residence
+					this.formData.nativePlace = profile.native_place || '';
+					this.formData.residence = profile.household_location || '';
+					
+					// Set current address
+					this.formData.currentAddress = profile.current_address || '';
+					
+					// Set marriage status
+					this.formData.marriage = profile.marital_status_text || '';
+					this.marriageIndex = this.marriageOptions.findIndex(item => item === this.formData.marriage);
+					
+					// Set three period status for female
+					if (this.formData.gender === '女' && profile.female_status !== undefined) {
+						const femaleStatusMap = {0: '无', 1: '孕期', 2: '产期', 3: '哺乳期'};
+						this.formData.threePeriod = femaleStatusMap[profile.female_status] || '无';
+						this.threePeriodIndex = this.threePeriodOptions.findIndex(item => item === this.formData.threePeriod);
+					}
+					
+					// Set expected salary
+					this.formData.expectedSalary = profile.expected_salary || '';
+					
+					// Set emergency contact
+					this.formData.emergencyContact = profile.emergency_contact || '';
+					this.formData.emergencyPhone = profile.emergency_phone || '';
+					
+					// Set hobby and motto
+					this.formData.hobby = profile.specialties || '';
+					this.formData.motto = profile.life_motto || '';
+					
+					// Set recruitment source
+					const sourceTypeMap = {
+						1: 'school',
+						2: 'social',
+						3: 'social',
+						4: 'social',
+						5: 'social'
+					};
+					
+					const socialSourceMap = {
+						2: 'BOSS',
+						3: 'zhilian',
+						4: 'liepin',
+						5: 'other'
+					};
+					
+					this.formData.sourceType = sourceTypeMap[profile.recruitment_source] || 'social';
+					
+					if (this.formData.sourceType === 'social') {
+						this.formData.socialSource = socialSourceMap[profile.recruitment_source] || '';
+						
+						if (this.formData.socialSource === 'other') {
+							this.formData.otherSocialSource = profile.recruitment_source_detail || '';
+						}
+					} else if (this.formData.sourceType === 'school') {
+						this.formData.otherSchoolSource = profile.recruitment_source_detail || '';
+					}
+				}
+				
+				// Populate educations data
+				if (educations && educations.length > 0) {
+					this.educationList = educations.map(edu => {
+						const degreeMap = {
+							1: '高中',
+							2: '大专',
+							3: '本科',
+							4: '硕士',
+							5: '博士'
+						};
+						
+						return {
+							startTime: edu.start_date || '',
+							endTime: edu.end_date || '',
+							schoolName: edu.school_name || '',
+							major: edu.major || '',
+							degree: degreeMap[edu.degree] || ''
+						};
+					});
+				}
+				
+				// Populate work experience data
+				if (work_experiences && work_experiences.length > 0) {
+					this.workList = work_experiences.map(work => {
+						return {
+							startTime: work.start_date || '',
+							endTime: work.end_date || '',
+							companyName: work.company_name || '',
+							department: work.department || '',
+							employeeCount: work.company_size || '',
+							position: work.position || '',
+							monthlySalary: work.monthly_salary || '',
+							supervisor: work.supervisor_name || '',
+							supervisorPhone: work.supervisor_phone || ''
+						};
+					});
+				}
+				
+				// Populate family members data
+				if (family_members && family_members.length > 0) {
+					this.familyMembers = family_members.map(member => {
+						return {
+							relation: member.relation || '',
+							name: member.name || '',
+							workplaceOrAddress: member.workplace || '',
+							position: member.position || '',
+							phone: member.phone || ''
+						};
+					});
+				}
+				
+				// If user profile is complete, we can skip the promise modal
+				if (user_info && user_info.is_profile_complete) {
+					this.showPromiseModal = false;
+				}
+			},
 		},
 		// 添加监听器来清除错误信息
 		watch: {
@@ -2243,4 +2441,39 @@ import { apiBaseUrl } from '@/common/config.js';
 		background-color: #cccccc;
 		color: #ffffff;
 	}
+
+	/* Loading indicator styles */
+	.loading-container {
+		position: fixed;
+		top: 0;
+		left: 0;
+		right: 0;
+		bottom: 0;
+		background-color: rgba(255, 255, 255, 0.8);
+		display: flex;
+		flex-direction: column;
+		justify-content: center;
+		align-items: center;
+		z-index: 1000;
+	}
+	
+	.loading-spinner {
+		width: 60rpx;
+		height: 60rpx;
+		border: 6rpx solid #f3f3f3;
+		border-top: 6rpx solid #007AFF;
+		border-radius: 50%;
+		animation: spin 1s linear infinite;
+		margin-bottom: 20rpx;
+	}
+	
+	.loading-text {
+		font-size: 28rpx;
+		color: #666;
+	}
+	
+	@keyframes spin {
+		0% { transform: rotate(0deg); }
+		100% { transform: rotate(360deg); }
+	}
 </style>

+ 7 - 7
pages/camera/camera.vue

@@ -332,7 +332,7 @@
 
 			selectOption(index) {
 				if (this.showResult) return; // 已显示结果时不能再选择
-				
+				console.log('selectOption',index);
 				// 判断当前题目类型
 				if (this.currentQuestion.questionType === 2) { // 多选题
 					// 如果已经选中,则取消选中
@@ -344,10 +344,10 @@
 						this.selectedOptions.push(index);
 					}
 					// 多选题不自动提交,需要用户手动点击"进入下一题"按钮
-				} else if (this.currentQuestion.questionType === 1 || this.currentQuestion.questionType === 3) { // 单选题或看图答题
+				} else if (this.currentQuestion.questionType === 1 || this.currentQuestion.questionType === 3 || this.currentQuestion.questionType === 4) { // 单选题、看图答题或类型4题目
 					this.selectedOption = index;
 					
-					// 单选题自动提交答案并进入下一题
+					// 自动提交答案并进入下一题
 					this.playAiSpeaking();
 					
 					// 短暂延迟后提交答案,让用户看到选中效果
@@ -473,7 +473,7 @@
 						answer: this.openQuestionAnswer,
 						answerDuration: this.getAnswerDuration() // 添加答题时长
 					};
-				} else if (this.currentQuestion.questionType === 1 || this.currentQuestion.questionType === 3) { // 单选题或看图答题
+				} else if (this.currentQuestion.questionType === 1 || this.currentQuestion.questionType === 3 || this.currentQuestion.questionType === 4) { // 单选题、看图答题或类型4题目
 					answer = {
 						questionId: this.currentQuestion.id,
 						questionType: this.currentQuestion.questionType,
@@ -532,7 +532,7 @@
 						// 开放题直接使用文本答案
 						answerContent = this.currentAnswer.answer;
 						answerOptions = [];
-					} else if (this.currentAnswer.questionType === 1 || this.currentAnswer.questionType === 3) {
+					} else if (this.currentAnswer.questionType === 1 || this.currentAnswer.questionType === 3 || this.currentAnswer.questionType === 4) {
 						// 单选题或看图答题,获取选项ID而不是索引
 						const selectedIndex = this.currentAnswer.answer;
 						const selectedOption = this.currentQuestion.options[selectedIndex];
@@ -833,7 +833,7 @@
 				
 				// 如果是当前正在回答的题目
 				if (qIndex === this.currentQuestionIndex) {
-					if (question.questionType === 1 || question.questionType === 3) { // 单选题
+					if (question.questionType === 1 || question.questionType === 3 || question.questionType === 4) { // 单选题
 						return this.selectedOption === optionIndex;
 					} else if (question.questionType === 2) { // 多选题
 						return this.selectedOptions.includes(optionIndex);
@@ -841,7 +841,7 @@
 				} 
 				// 如果是已回答过的题目,使用保存的答案
 				else if (answer) {
-					if (question.questionType === 1 || question.questionType === 3) { // 单选题
+					if (question.questionType === 1 || question.questionType === 3 || question.questionType === 4) { // 单选题
 						return answer.answer === optionIndex;
 					} else if (question.questionType === 2 && Array.isArray(answer.answer)) { // 多选题
 						return answer.answer.includes(optionIndex);

+ 302 - 165
unpackage/dist/dev/mp-weixin/pages/Personal/Personal.js

@@ -106,9 +106,14 @@ const _sfc_main = {
         name: "",
         idCard: "",
         phone: ""
-      }
+      },
+      // Add loading state
+      isLoading: true
     };
   },
+  onLoad() {
+    this.fetchUserData();
+  },
   methods: {
     // 添加承诺书相关方法
     togglePromiseChecked() {
@@ -826,6 +831,136 @@ const _sfc_main = {
         default:
           return true;
       }
+    },
+    // Add method to fetch user data
+    fetchUserData() {
+      this.isLoading = true;
+      const userInfo = common_vendor.index.getStorageSync("userInfo") ? JSON.parse(common_vendor.index.getStorageSync("userInfo")) : {};
+      const openid = userInfo.openid;
+      if (!openid) {
+        common_vendor.index.showToast({
+          title: "用户信息获取失败,请重新登录",
+          icon: "none"
+        });
+        this.isLoading = false;
+        return;
+      }
+      common_vendor.index.request({
+        url: `${common_config.apiBaseUrl}/api/wechat/user/get_full_info?tenant_id=1&openid=${openid}`,
+        method: "GET",
+        success: (res) => {
+          this.populateFormData(res.data.data);
+        },
+        fail: (err) => {
+        },
+        complete: () => {
+          this.isLoading = false;
+        }
+      });
+    },
+    // Add method to populate form data with fetched data
+    populateFormData(data) {
+      const { user_info, profile, educations, work_experiences, family_members } = data;
+      if (user_info) {
+        this.formData.name = user_info.name || "";
+        this.formData.gender = user_info.gender_text || "";
+        this.genderIndex = this.genderOptions.findIndex((item) => item === this.formData.gender);
+        this.formData.idCard = user_info.id_card || "";
+        this.formData.phone = user_info.phone || "";
+        this.formData.email = user_info.email || "";
+      }
+      if (profile) {
+        this.formData.political = profile.political_status || "";
+        this.politicalIndex = this.politicalOptions.findIndex((item) => item === this.formData.political);
+        this.formData.ethnic = profile.ethnicity || "";
+        this.ethnicIndex = this.ethnicOptions.findIndex((item) => item === this.formData.ethnic);
+        this.formData.height = profile.height || "";
+        this.formData.weight = profile.weight || "";
+        this.formData.nativePlace = profile.native_place || "";
+        this.formData.residence = profile.household_location || "";
+        this.formData.currentAddress = profile.current_address || "";
+        this.formData.marriage = profile.marital_status_text || "";
+        this.marriageIndex = this.marriageOptions.findIndex((item) => item === this.formData.marriage);
+        if (this.formData.gender === "女" && profile.female_status !== void 0) {
+          const femaleStatusMap = { 0: "无", 1: "孕期", 2: "产期", 3: "哺乳期" };
+          this.formData.threePeriod = femaleStatusMap[profile.female_status] || "无";
+          this.threePeriodIndex = this.threePeriodOptions.findIndex((item) => item === this.formData.threePeriod);
+        }
+        this.formData.expectedSalary = profile.expected_salary || "";
+        this.formData.emergencyContact = profile.emergency_contact || "";
+        this.formData.emergencyPhone = profile.emergency_phone || "";
+        this.formData.hobby = profile.specialties || "";
+        this.formData.motto = profile.life_motto || "";
+        const sourceTypeMap = {
+          1: "school",
+          2: "social",
+          3: "social",
+          4: "social",
+          5: "social"
+        };
+        const socialSourceMap = {
+          2: "BOSS",
+          3: "zhilian",
+          4: "liepin",
+          5: "other"
+        };
+        this.formData.sourceType = sourceTypeMap[profile.recruitment_source] || "social";
+        if (this.formData.sourceType === "social") {
+          this.formData.socialSource = socialSourceMap[profile.recruitment_source] || "";
+          if (this.formData.socialSource === "other") {
+            this.formData.otherSocialSource = profile.recruitment_source_detail || "";
+          }
+        } else if (this.formData.sourceType === "school") {
+          this.formData.otherSchoolSource = profile.recruitment_source_detail || "";
+        }
+      }
+      if (educations && educations.length > 0) {
+        this.educationList = educations.map((edu) => {
+          const degreeMap = {
+            1: "高中",
+            2: "大专",
+            3: "本科",
+            4: "硕士",
+            5: "博士"
+          };
+          return {
+            startTime: edu.start_date || "",
+            endTime: edu.end_date || "",
+            schoolName: edu.school_name || "",
+            major: edu.major || "",
+            degree: degreeMap[edu.degree] || ""
+          };
+        });
+      }
+      if (work_experiences && work_experiences.length > 0) {
+        this.workList = work_experiences.map((work) => {
+          return {
+            startTime: work.start_date || "",
+            endTime: work.end_date || "",
+            companyName: work.company_name || "",
+            department: work.department || "",
+            employeeCount: work.company_size || "",
+            position: work.position || "",
+            monthlySalary: work.monthly_salary || "",
+            supervisor: work.supervisor_name || "",
+            supervisorPhone: work.supervisor_phone || ""
+          };
+        });
+      }
+      if (family_members && family_members.length > 0) {
+        this.familyMembers = family_members.map((member) => {
+          return {
+            relation: member.relation || "",
+            name: member.name || "",
+            workplaceOrAddress: member.workplace || "",
+            position: member.position || "",
+            phone: member.phone || ""
+          };
+        });
+      }
+      if (user_info && user_info.is_profile_complete) {
+        this.showPromiseModal = false;
+      }
     }
   },
   // 添加监听器来清除错误信息
@@ -849,90 +984,92 @@ const _sfc_main = {
 };
 function _sfc_render(_ctx, _cache, $props, $setup, $data, $options) {
   return common_vendor.e({
-    a: $data.showPromiseModal
+    a: $data.isLoading
+  }, $data.isLoading ? {} : {}, {
+    b: $data.showPromiseModal
   }, $data.showPromiseModal ? {
-    b: $data.promiseChecked,
-    c: common_vendor.o((...args) => $options.togglePromiseChecked && $options.togglePromiseChecked(...args)),
-    d: !$data.promiseChecked,
-    e: common_vendor.o((...args) => $options.confirmPromise && $options.confirmPromise(...args))
+    c: $data.promiseChecked,
+    d: common_vendor.o((...args) => $options.togglePromiseChecked && $options.togglePromiseChecked(...args)),
+    e: !$data.promiseChecked,
+    f: common_vendor.o((...args) => $options.confirmPromise && $options.confirmPromise(...args))
   } : {}, {
-    f: $data.currentStep === 1
+    g: $data.currentStep === 1
   }, $data.currentStep === 1 ? common_vendor.e({
-    g: $data.formErrors.name ? 1 : "",
-    h: $data.formData.name,
-    i: common_vendor.o(($event) => $data.formData.name = $event.detail.value),
-    j: $data.formErrors.name
+    h: $data.formErrors.name ? 1 : "",
+    i: $data.formData.name,
+    j: common_vendor.o(($event) => $data.formData.name = $event.detail.value),
+    k: $data.formErrors.name
   }, $data.formErrors.name ? {
-    k: common_vendor.t($data.formErrors.name)
+    l: common_vendor.t($data.formErrors.name)
   } : {}, {
-    l: common_vendor.t($data.genderOptions[$data.genderIndex] || "请选择性别"),
-    m: common_vendor.o((...args) => $options.bindGenderChange && $options.bindGenderChange(...args)),
-    n: $data.genderIndex,
-    o: $data.genderOptions,
-    p: $data.formData.gender === "女"
+    m: common_vendor.t($data.genderOptions[$data.genderIndex] || "请选择性别"),
+    n: common_vendor.o((...args) => $options.bindGenderChange && $options.bindGenderChange(...args)),
+    o: $data.genderIndex,
+    p: $data.genderOptions,
+    q: $data.formData.gender === "女"
   }, $data.formData.gender === "女" ? {
-    q: common_vendor.t($data.threePeriodOptions[$data.threePeriodIndex] || "请选择"),
-    r: common_vendor.o((...args) => $options.bindThreePeriodChange && $options.bindThreePeriodChange(...args)),
-    s: $data.threePeriodIndex,
-    t: $data.threePeriodOptions
+    r: common_vendor.t($data.threePeriodOptions[$data.threePeriodIndex] || "请选择"),
+    s: common_vendor.o((...args) => $options.bindThreePeriodChange && $options.bindThreePeriodChange(...args)),
+    t: $data.threePeriodIndex,
+    v: $data.threePeriodOptions
   } : {}, {
-    v: $data.formErrors.phone ? 1 : "",
-    w: $data.formData.phone,
-    x: common_vendor.o(($event) => $data.formData.phone = $event.detail.value),
-    y: $data.formErrors.phone
+    w: $data.formErrors.phone ? 1 : "",
+    x: $data.formData.phone,
+    y: common_vendor.o(($event) => $data.formData.phone = $event.detail.value),
+    z: $data.formErrors.phone
   }, $data.formErrors.phone ? {
-    z: common_vendor.t($data.formErrors.phone)
+    A: common_vendor.t($data.formErrors.phone)
   } : {}, {
-    A: $data.formErrors.idCard ? 1 : "",
-    B: $data.formData.idCard,
-    C: common_vendor.o(($event) => $data.formData.idCard = $event.detail.value),
-    D: $data.formErrors.idCard
+    B: $data.formErrors.idCard ? 1 : "",
+    C: $data.formData.idCard,
+    D: common_vendor.o(($event) => $data.formData.idCard = $event.detail.value),
+    E: $data.formErrors.idCard
   }, $data.formErrors.idCard ? {
-    E: common_vendor.t($data.formErrors.idCard)
+    F: common_vendor.t($data.formErrors.idCard)
   } : {}, {
-    F: common_vendor.t($data.politicalOptions[$data.politicalIndex] || "请选择政治面貌"),
-    G: common_vendor.o((...args) => $options.bindPoliticalChange && $options.bindPoliticalChange(...args)),
-    H: $data.politicalIndex,
-    I: $data.politicalOptions,
-    J: common_vendor.t($data.ethnicOptions[$data.ethnicIndex] || "请选择民族"),
-    K: common_vendor.o((...args) => $options.bindEthnicChange && $options.bindEthnicChange(...args)),
-    L: $data.ethnicIndex,
-    M: $data.ethnicOptions,
-    N: $data.formData.height,
-    O: common_vendor.o(($event) => $data.formData.height = $event.detail.value),
-    P: $data.formData.weight,
-    Q: common_vendor.o(($event) => $data.formData.weight = $event.detail.value),
-    R: $data.formData.nativePlace,
-    S: common_vendor.o(($event) => $data.formData.nativePlace = $event.detail.value),
-    T: $data.formData.residence,
-    U: common_vendor.o(($event) => $data.formData.residence = $event.detail.value),
-    V: common_vendor.t($data.marriageOptions[$data.marriageIndex] || "请选择婚育状况"),
-    W: common_vendor.o((...args) => $options.bindMarriageChange && $options.bindMarriageChange(...args)),
-    X: $data.marriageIndex,
-    Y: $data.marriageOptions,
-    Z: $data.formData.expectedSalary,
-    aa: common_vendor.o(($event) => $data.formData.expectedSalary = $event.detail.value)
+    G: common_vendor.t($data.politicalOptions[$data.politicalIndex] || "请选择政治面貌"),
+    H: common_vendor.o((...args) => $options.bindPoliticalChange && $options.bindPoliticalChange(...args)),
+    I: $data.politicalIndex,
+    J: $data.politicalOptions,
+    K: common_vendor.t($data.ethnicOptions[$data.ethnicIndex] || "请选择民族"),
+    L: common_vendor.o((...args) => $options.bindEthnicChange && $options.bindEthnicChange(...args)),
+    M: $data.ethnicIndex,
+    N: $data.ethnicOptions,
+    O: $data.formData.height,
+    P: common_vendor.o(($event) => $data.formData.height = $event.detail.value),
+    Q: $data.formData.weight,
+    R: common_vendor.o(($event) => $data.formData.weight = $event.detail.value),
+    S: $data.formData.nativePlace,
+    T: common_vendor.o(($event) => $data.formData.nativePlace = $event.detail.value),
+    U: $data.formData.residence,
+    V: common_vendor.o(($event) => $data.formData.residence = $event.detail.value),
+    W: common_vendor.t($data.marriageOptions[$data.marriageIndex] || "请选择婚育状况"),
+    X: common_vendor.o((...args) => $options.bindMarriageChange && $options.bindMarriageChange(...args)),
+    Y: $data.marriageIndex,
+    Z: $data.marriageOptions,
+    aa: $data.formData.expectedSalary,
+    ab: common_vendor.o(($event) => $data.formData.expectedSalary = $event.detail.value)
   }) : {}, {
-    ab: $data.currentStep === 2
+    ac: $data.currentStep === 2
   }, $data.currentStep === 2 ? {
-    ac: $data.formData.email,
-    ad: common_vendor.o(($event) => $data.formData.email = $event.detail.value),
-    ae: $data.formData.currentAddress,
-    af: common_vendor.o(($event) => $data.formData.currentAddress = $event.detail.value),
-    ag: $data.formData.emergencyContact,
-    ah: common_vendor.o(($event) => $data.formData.emergencyContact = $event.detail.value),
-    ai: $data.formData.emergencyPhone,
-    aj: common_vendor.o(($event) => $data.formData.emergencyPhone = $event.detail.value),
-    ak: $data.formData.hobby,
-    al: common_vendor.o(($event) => $data.formData.hobby = $event.detail.value),
-    am: $data.formData.motto,
-    an: common_vendor.o(($event) => $data.formData.motto = $event.detail.value)
+    ad: $data.formData.email,
+    ae: common_vendor.o(($event) => $data.formData.email = $event.detail.value),
+    af: $data.formData.currentAddress,
+    ag: common_vendor.o(($event) => $data.formData.currentAddress = $event.detail.value),
+    ah: $data.formData.emergencyContact,
+    ai: common_vendor.o(($event) => $data.formData.emergencyContact = $event.detail.value),
+    aj: $data.formData.emergencyPhone,
+    ak: common_vendor.o(($event) => $data.formData.emergencyPhone = $event.detail.value),
+    al: $data.formData.hobby,
+    am: common_vendor.o(($event) => $data.formData.hobby = $event.detail.value),
+    an: $data.formData.motto,
+    ao: common_vendor.o(($event) => $data.formData.motto = $event.detail.value)
   } : {}, {
-    ao: $data.currentStep === 3
+    ap: $data.currentStep === 3
   }, $data.currentStep === 3 ? common_vendor.e({
-    ap: $data.familyMembers.length > 0
+    aq: $data.familyMembers.length > 0
   }, $data.familyMembers.length > 0 ? {
-    aq: common_vendor.f($data.familyMembers, (member, index, i0) => {
+    ar: common_vendor.f($data.familyMembers, (member, index, i0) => {
       return {
         a: common_vendor.t(index + 1),
         b: common_vendor.o(($event) => $options.editFamilyMember(index), index),
@@ -946,43 +1083,43 @@ function _sfc_render(_ctx, _cache, $props, $setup, $data, $options) {
       };
     })
   } : {}, {
-    ar: common_vendor.t($data.isEditing ? "编辑家庭成员" : "添加家庭成员"),
-    as: $data.isEditing
+    as: common_vendor.t($data.isEditing ? "编辑家庭成员" : "添加家庭成员"),
+    at: $data.isEditing
   }, $data.isEditing ? {
-    at: common_vendor.o((...args) => $options.cancelEdit && $options.cancelEdit(...args))
+    av: common_vendor.o((...args) => $options.cancelEdit && $options.cancelEdit(...args))
   } : {}, {
-    av: $data.familyMemberForm.relation,
-    aw: common_vendor.o(($event) => $data.familyMemberForm.relation = $event.detail.value),
-    ax: $data.familyMemberForm.name,
-    ay: common_vendor.o(($event) => $data.familyMemberForm.name = $event.detail.value),
-    az: $data.familyMemberForm.workplaceOrAddress,
-    aA: common_vendor.o(($event) => $data.familyMemberForm.workplaceOrAddress = $event.detail.value),
-    aB: $data.familyMemberForm.position,
-    aC: common_vendor.o(($event) => $data.familyMemberForm.position = $event.detail.value),
-    aD: $data.familyMemberForm.phone,
-    aE: common_vendor.o(($event) => $data.familyMemberForm.phone = $event.detail.value),
-    aF: common_vendor.t($data.isEditing ? "✓" : "+"),
-    aG: common_vendor.o((...args) => $options.saveFamilyMember && $options.saveFamilyMember(...args)),
-    aH: common_vendor.t($data.isEditing ? "保存修改" : "添加成员")
+    aw: $data.familyMemberForm.relation,
+    ax: common_vendor.o(($event) => $data.familyMemberForm.relation = $event.detail.value),
+    ay: $data.familyMemberForm.name,
+    az: common_vendor.o(($event) => $data.familyMemberForm.name = $event.detail.value),
+    aA: $data.familyMemberForm.workplaceOrAddress,
+    aB: common_vendor.o(($event) => $data.familyMemberForm.workplaceOrAddress = $event.detail.value),
+    aC: $data.familyMemberForm.position,
+    aD: common_vendor.o(($event) => $data.familyMemberForm.position = $event.detail.value),
+    aE: $data.familyMemberForm.phone,
+    aF: common_vendor.o(($event) => $data.familyMemberForm.phone = $event.detail.value),
+    aG: common_vendor.t($data.isEditing ? "✓" : "+"),
+    aH: common_vendor.o((...args) => $options.saveFamilyMember && $options.saveFamilyMember(...args)),
+    aI: common_vendor.t($data.isEditing ? "保存修改" : "添加成员")
   }) : {}, {
-    aI: $data.currentStep === 4
+    aJ: $data.currentStep === 4
   }, $data.currentStep === 4 ? {
-    aJ: $data.formData.sourceType === "social" && $data.formData.socialSource === "BOSS",
-    aK: common_vendor.o(($event) => $options.selectSocialSource("BOSS")),
-    aL: $data.formData.sourceType === "social" && $data.formData.socialSource === "zhilian",
-    aM: common_vendor.o(($event) => $options.selectSocialSource("zhilian")),
-    aN: $data.formData.sourceType === "social" && $data.formData.socialSource === "liepin",
-    aO: common_vendor.o(($event) => $options.selectSocialSource("liepin")),
-    aP: $data.formData.sourceType !== "social" || $data.formData.socialSource !== "other",
-    aQ: common_vendor.o(($event) => $options.selectSocialSource("other")),
-    aR: $data.formData.otherSocialSource,
-    aS: common_vendor.o(($event) => $data.formData.otherSocialSource = $event.detail.value)
+    aK: $data.formData.sourceType === "social" && $data.formData.socialSource === "BOSS",
+    aL: common_vendor.o(($event) => $options.selectSocialSource("BOSS")),
+    aM: $data.formData.sourceType === "social" && $data.formData.socialSource === "zhilian",
+    aN: common_vendor.o(($event) => $options.selectSocialSource("zhilian")),
+    aO: $data.formData.sourceType === "social" && $data.formData.socialSource === "liepin",
+    aP: common_vendor.o(($event) => $options.selectSocialSource("liepin")),
+    aQ: $data.formData.sourceType !== "social" || $data.formData.socialSource !== "other",
+    aR: common_vendor.o(($event) => $options.selectSocialSource("other")),
+    aS: $data.formData.otherSocialSource,
+    aT: common_vendor.o(($event) => $data.formData.otherSocialSource = $event.detail.value)
   } : {}, {
-    aT: $data.currentStep === 5
+    aU: $data.currentStep === 5
   }, $data.currentStep === 5 ? common_vendor.e({
-    aU: $data.educationList.length > 0
+    aV: $data.educationList.length > 0
   }, $data.educationList.length > 0 ? {
-    aV: common_vendor.f($data.educationList, (edu, index, i0) => {
+    aW: common_vendor.f($data.educationList, (edu, index, i0) => {
       return {
         a: common_vendor.t(index === 0 ? "第一学历" : "最高学历"),
         b: common_vendor.o(($event) => $options.editEducation(index), index),
@@ -996,46 +1133,46 @@ function _sfc_render(_ctx, _cache, $props, $setup, $data, $options) {
       };
     })
   } : {}, {
-    aW: $data.educationList.length < 2 || $data.isEditingEducation
+    aX: $data.educationList.length < 2 || $data.isEditingEducation
   }, $data.educationList.length < 2 || $data.isEditingEducation ? common_vendor.e({
-    aX: common_vendor.t($data.isEditingEducation ? "编辑教育经历" : $data.educationList.length === 0 ? "添加第一学历" : "添加最高学历"),
-    aY: $data.isEditingEducation
+    aY: common_vendor.t($data.isEditingEducation ? "编辑教育经历" : $data.educationList.length === 0 ? "添加第一学历" : "添加最高学历"),
+    aZ: $data.isEditingEducation
   }, $data.isEditingEducation ? {
-    aZ: common_vendor.o((...args) => $options.cancelEditEducation && $options.cancelEditEducation(...args))
+    ba: common_vendor.o((...args) => $options.cancelEditEducation && $options.cancelEditEducation(...args))
   } : {}, {
-    ba: common_vendor.t($data.educationForm.startTime || "开始时间"),
-    bb: $data.educationForm.startTime,
-    bc: common_vendor.o((...args) => $options.bindStartTimeChange && $options.bindStartTimeChange(...args)),
-    bd: common_vendor.t($data.educationForm.endTime || "结束时间"),
-    be: $data.educationForm.endTime,
-    bf: common_vendor.o((...args) => $options.bindEndTimeChange && $options.bindEndTimeChange(...args)),
-    bg: $data.educationForm.schoolName,
-    bh: common_vendor.o(($event) => $data.educationForm.schoolName = $event.detail.value),
-    bi: $data.educationForm.major,
-    bj: common_vendor.o(($event) => $data.educationForm.major = $event.detail.value),
-    bk: common_vendor.t($data.degreeOptions[$data.degreeIndex] || "请选择学历"),
-    bl: common_vendor.o((...args) => $options.bindDegreeChange && $options.bindDegreeChange(...args)),
-    bm: $data.degreeIndex,
-    bn: $data.degreeOptions,
-    bo: common_vendor.t($data.isEditingEducation ? "✓" : "+"),
-    bp: common_vendor.o((...args) => $options.saveEducation && $options.saveEducation(...args)),
-    bq: common_vendor.t($data.isEditingEducation ? "保存修改" : "添加学历")
+    bb: common_vendor.t($data.educationForm.startTime || "开始时间"),
+    bc: $data.educationForm.startTime,
+    bd: common_vendor.o((...args) => $options.bindStartTimeChange && $options.bindStartTimeChange(...args)),
+    be: common_vendor.t($data.educationForm.endTime || "结束时间"),
+    bf: $data.educationForm.endTime,
+    bg: common_vendor.o((...args) => $options.bindEndTimeChange && $options.bindEndTimeChange(...args)),
+    bh: $data.educationForm.schoolName,
+    bi: common_vendor.o(($event) => $data.educationForm.schoolName = $event.detail.value),
+    bj: $data.educationForm.major,
+    bk: common_vendor.o(($event) => $data.educationForm.major = $event.detail.value),
+    bl: common_vendor.t($data.degreeOptions[$data.degreeIndex] || "请选择学历"),
+    bm: common_vendor.o((...args) => $options.bindDegreeChange && $options.bindDegreeChange(...args)),
+    bn: $data.degreeIndex,
+    bo: $data.degreeOptions,
+    bp: common_vendor.t($data.isEditingEducation ? "✓" : "+"),
+    bq: common_vendor.o((...args) => $options.saveEducation && $options.saveEducation(...args)),
+    br: common_vendor.t($data.isEditingEducation ? "保存修改" : "添加学历")
   }) : {}) : {}, {
-    br: $data.currentStep === 6
+    bs: $data.currentStep === 6
   }, $data.currentStep === 6 ? {
-    bs: $data.formData.skills,
-    bt: common_vendor.o(($event) => $data.formData.skills = $event.detail.value)
+    bt: $data.formData.skills,
+    bv: common_vendor.o(($event) => $data.formData.skills = $event.detail.value)
   } : {}, {
-    bv: $data.currentStep === 7
+    bw: $data.currentStep === 7
   }, $data.currentStep === 7 ? {
-    bw: $data.formData.training,
-    bx: common_vendor.o(($event) => $data.formData.training = $event.detail.value)
+    bx: $data.formData.training,
+    by: common_vendor.o(($event) => $data.formData.training = $event.detail.value)
   } : {}, {
-    by: $data.currentStep === 8
+    bz: $data.currentStep === 8
   }, $data.currentStep === 8 ? common_vendor.e({
-    bz: $data.workList.length > 0
+    bA: $data.workList.length > 0
   }, $data.workList.length > 0 ? {
-    bA: common_vendor.f($data.workList, (work, index, i0) => {
+    bB: common_vendor.f($data.workList, (work, index, i0) => {
       return {
         a: common_vendor.t(index + 1),
         b: common_vendor.o(($event) => $options.editWork(index), index),
@@ -1053,53 +1190,53 @@ function _sfc_render(_ctx, _cache, $props, $setup, $data, $options) {
       };
     })
   } : {}, {
-    bB: $data.workList.length < 2 || $data.isEditingWork
+    bC: $data.workList.length < 2 || $data.isEditingWork
   }, $data.workList.length < 2 || $data.isEditingWork ? common_vendor.e({
-    bC: common_vendor.t($data.isEditingWork ? "编辑工作经历" : "添加工作经历"),
-    bD: $data.isEditingWork
+    bD: common_vendor.t($data.isEditingWork ? "编辑工作经历" : "添加工作经历"),
+    bE: $data.isEditingWork
   }, $data.isEditingWork ? {
-    bE: common_vendor.o((...args) => $options.cancelEditWork && $options.cancelEditWork(...args))
+    bF: common_vendor.o((...args) => $options.cancelEditWork && $options.cancelEditWork(...args))
   } : {}, {
-    bF: common_vendor.t($data.workForm.startTime || "开始时间"),
-    bG: $data.workForm.startTime,
-    bH: common_vendor.o((...args) => $options.bindWorkStartTimeChange && $options.bindWorkStartTimeChange(...args)),
-    bI: common_vendor.t($data.workForm.endTime || "结束时间"),
-    bJ: $data.workForm.endTime,
-    bK: common_vendor.o((...args) => $options.bindWorkEndTimeChange && $options.bindWorkEndTimeChange(...args)),
-    bL: $data.workForm.companyName,
-    bM: common_vendor.o(($event) => $data.workForm.companyName = $event.detail.value),
-    bN: $data.workForm.employeeCount,
-    bO: common_vendor.o(($event) => $data.workForm.employeeCount = $event.detail.value),
-    bP: $data.workForm.department,
-    bQ: common_vendor.o(($event) => $data.workForm.department = $event.detail.value),
-    bR: $data.workForm.position,
-    bS: common_vendor.o(($event) => $data.workForm.position = $event.detail.value),
-    bT: $data.workForm.monthlySalary,
-    bU: common_vendor.o(($event) => $data.workForm.monthlySalary = $event.detail.value),
-    bV: $data.workForm.supervisor,
-    bW: common_vendor.o(($event) => $data.workForm.supervisor = $event.detail.value),
-    bX: $data.workForm.supervisorPhone,
-    bY: common_vendor.o(($event) => $data.workForm.supervisorPhone = $event.detail.value),
-    bZ: common_vendor.t($data.isEditingWork ? "✓" : "+"),
-    ca: common_vendor.o((...args) => $options.saveWork && $options.saveWork(...args)),
-    cb: common_vendor.t($data.isEditingWork ? "保存修改" : "添加工作经历")
+    bG: common_vendor.t($data.workForm.startTime || "开始时间"),
+    bH: $data.workForm.startTime,
+    bI: common_vendor.o((...args) => $options.bindWorkStartTimeChange && $options.bindWorkStartTimeChange(...args)),
+    bJ: common_vendor.t($data.workForm.endTime || "结束时间"),
+    bK: $data.workForm.endTime,
+    bL: common_vendor.o((...args) => $options.bindWorkEndTimeChange && $options.bindWorkEndTimeChange(...args)),
+    bM: $data.workForm.companyName,
+    bN: common_vendor.o(($event) => $data.workForm.companyName = $event.detail.value),
+    bO: $data.workForm.employeeCount,
+    bP: common_vendor.o(($event) => $data.workForm.employeeCount = $event.detail.value),
+    bQ: $data.workForm.department,
+    bR: common_vendor.o(($event) => $data.workForm.department = $event.detail.value),
+    bS: $data.workForm.position,
+    bT: common_vendor.o(($event) => $data.workForm.position = $event.detail.value),
+    bU: $data.workForm.monthlySalary,
+    bV: common_vendor.o(($event) => $data.workForm.monthlySalary = $event.detail.value),
+    bW: $data.workForm.supervisor,
+    bX: common_vendor.o(($event) => $data.workForm.supervisor = $event.detail.value),
+    bY: $data.workForm.supervisorPhone,
+    bZ: common_vendor.o(($event) => $data.workForm.supervisorPhone = $event.detail.value),
+    ca: common_vendor.t($data.isEditingWork ? "✓" : "+"),
+    cb: common_vendor.o((...args) => $options.saveWork && $options.saveWork(...args)),
+    cc: common_vendor.t($data.isEditingWork ? "保存修改" : "添加工作经历")
   }) : {}) : {}, {
-    cc: $data.currentStep === 9
+    cd: $data.currentStep === 9
   }, $data.currentStep === 9 ? {
-    cd: common_vendor.t($data.formData.name),
-    ce: common_vendor.t($data.formData.gender)
+    ce: common_vendor.t($data.formData.name),
+    cf: common_vendor.t($data.formData.gender)
   } : {}, {
-    cf: $data.currentStep > 1
+    cg: $data.currentStep > 1
   }, $data.currentStep > 1 ? {
-    cg: common_vendor.o((...args) => $options.prevStep && $options.prevStep(...args))
+    ch: common_vendor.o((...args) => $options.prevStep && $options.prevStep(...args))
   } : {}, {
-    ch: $data.currentStep < $data.steps.length
+    ci: $data.currentStep < $data.steps.length
   }, $data.currentStep < $data.steps.length ? {
-    ci: common_vendor.o((...args) => $options.nextStep && $options.nextStep(...args))
+    cj: common_vendor.o((...args) => $options.nextStep && $options.nextStep(...args))
   } : {}, {
-    cj: $data.currentStep === $data.steps.length
+    ck: $data.currentStep === $data.steps.length
   }, $data.currentStep === $data.steps.length ? {
-    ck: common_vendor.o((...args) => $options.submitForm && $options.submitForm(...args))
+    cl: common_vendor.o((...args) => $options.submitForm && $options.submitForm(...args))
   } : {});
 }
 const MiniProgramPage = /* @__PURE__ */ common_vendor._export_sfc(_sfc_main, [["render", _sfc_render]]);

Файловите разлики са ограничени, защото са твърде много
+ 0 - 0
unpackage/dist/dev/mp-weixin/pages/Personal/Personal.wxml


+ 34 - 0
unpackage/dist/dev/mp-weixin/pages/Personal/Personal.wxss

@@ -597,4 +597,38 @@ input {
 .confirm-btn[disabled] {
 		background-color: #cccccc;
 		color: #ffffff;
+}
+
+	/* Loading indicator styles */
+.loading-container {
+		position: fixed;
+		top: 0;
+		left: 0;
+		right: 0;
+		bottom: 0;
+		background-color: rgba(255, 255, 255, 0.8);
+		display: flex;
+		flex-direction: column;
+		justify-content: center;
+		align-items: center;
+		z-index: 1000;
+}
+.loading-spinner {
+		width: 60rpx;
+		height: 60rpx;
+		border: 6rpx solid #f3f3f3;
+		border-top: 6rpx solid #007AFF;
+		border-radius: 50%;
+		animation: spin 1s linear infinite;
+		margin-bottom: 20rpx;
+}
+.loading-text {
+		font-size: 28rpx;
+		color: #666;
+}
+@keyframes spin {
+0% { transform: rotate(0deg);
+}
+100% { transform: rotate(360deg);
+}
 }

+ 6 - 5
unpackage/dist/dev/mp-weixin/pages/camera/camera.js

@@ -194,6 +194,7 @@ const _sfc_main = {
     selectOption(index) {
       if (this.showResult)
         return;
+      console.log("selectOption", index);
       if (this.currentQuestion.questionType === 2) {
         const optionIndex = this.selectedOptions.indexOf(index);
         if (optionIndex > -1) {
@@ -201,7 +202,7 @@ const _sfc_main = {
         } else {
           this.selectedOptions.push(index);
         }
-      } else if (this.currentQuestion.questionType === 1 || this.currentQuestion.questionType === 3) {
+      } else if (this.currentQuestion.questionType === 1 || this.currentQuestion.questionType === 3 || this.currentQuestion.questionType === 4) {
         this.selectedOption = index;
         this.playAiSpeaking();
         setTimeout(() => {
@@ -296,7 +297,7 @@ const _sfc_main = {
           answerDuration: this.getAnswerDuration()
           // 添加答题时长
         };
-      } else if (this.currentQuestion.questionType === 1 || this.currentQuestion.questionType === 3) {
+      } else if (this.currentQuestion.questionType === 1 || this.currentQuestion.questionType === 3 || this.currentQuestion.questionType === 4) {
         answer = {
           questionId: this.currentQuestion.id,
           questionType: this.currentQuestion.questionType,
@@ -342,7 +343,7 @@ const _sfc_main = {
         if (this.currentAnswer.questionType === 0) {
           answerContent = this.currentAnswer.answer;
           answerOptions = [];
-        } else if (this.currentAnswer.questionType === 1 || this.currentAnswer.questionType === 3) {
+        } else if (this.currentAnswer.questionType === 1 || this.currentAnswer.questionType === 3 || this.currentAnswer.questionType === 4) {
           const selectedIndex = this.currentAnswer.answer;
           const selectedOption = this.currentQuestion.options[selectedIndex];
           console.log("selectedOption", selectedOption);
@@ -533,13 +534,13 @@ const _sfc_main = {
     isOptionSelected(question, qIndex, optionIndex) {
       const answer = this.answers.find((a) => a.questionId === question.id);
       if (qIndex === this.currentQuestionIndex) {
-        if (question.questionType === 1 || question.questionType === 3) {
+        if (question.questionType === 1 || question.questionType === 3 || question.questionType === 4) {
           return this.selectedOption === optionIndex;
         } else if (question.questionType === 2) {
           return this.selectedOptions.includes(optionIndex);
         }
       } else if (answer) {
-        if (question.questionType === 1 || question.questionType === 3) {
+        if (question.questionType === 1 || question.questionType === 3 || question.questionType === 4) {
           return answer.answer === optionIndex;
         } else if (question.questionType === 2 && Array.isArray(answer.answer)) {
           return answer.answer.includes(optionIndex);

+ 7 - 0
unpackage/dist/dev/mp-weixin/project.private.config.json

@@ -7,6 +7,13 @@
   "condition": {
     "miniprogram": {
       "list": [
+        {
+          "name": "pages/camera/camera",
+          "pathName": "pages/camera/camera",
+          "query": "",
+          "launchMode": "default",
+          "scene": null
+        },
         {
           "name": "pages/interview-question/interview-question",
           "pathName": "pages/interview-question/interview-question",

Някои файлове не бяха показани, защото твърде много файлове са промени