浏览代码

完善人信息

yangg 6 天之前
父节点
当前提交
ed9b6e446b
共有 1 个文件被更改,包括 15 次插入14 次删除
  1. 15 14
      src/views/JobApplication/report/report.vue

+ 15 - 14
src/views/JobApplication/report/report.vue

@@ -1710,11 +1710,12 @@ export default {
         }
 
         const data = await response.json();
-        
-        if (data.success && data.profile) {
-          const basicInfo = data.profile.basic_info;
-          const education = data.profile.educations[0] || {};
-          const workExp = data.profile.work_experiences[0] || {};
+        console.log(data)
+        if (data.code === 2000 && data.data) {
+          const basicInfo = data.data.user_info;
+          const education = data.data.educations[0] || {};
+          const profile = data.data.profile;
+          const workExp = data.data.work_experiences[0] || {};
 
           // 更新用户详细信息
           this.userProfile = {
@@ -1724,18 +1725,18 @@ export default {
             education: this.getEducationLevel(education.degree),
             phone: basicInfo.phone || this.userInfo.phone,
             email: '',  // API中没有邮箱字段
-            address: basicInfo.current_address || '',
+            address: profile.current_address || '',
             position: workExp.position || '',
             experience: this.formatWorkExperience(workExp),
-            expectedSalary: basicInfo.expected_salary ? `${basicInfo.expected_salary}元/月` : '',
+            expectedSalary: workExp.monthly_salary ? `${workExp.monthly_salary}元/月` : '',
             idCard: basicInfo.id_card || '',
-            height: basicInfo.height ? `${basicInfo.height}cm` : '',
-            weight: basicInfo.weight ? `${basicInfo.weight}kg` : '',
-            nativePlace: basicInfo.native_place || '',
-            politicalStatus: basicInfo.political_status || '',
-            ethnicity: basicInfo.ethnicity || '',
-            maritalStatus: this.getMaritalStatus(basicInfo.marital_status),
-            specialties: basicInfo.specialties || '',
+            height: profile.height ? `${profile.height}cm` : '',
+            weight: profile.weight ? `${profile.weight}kg` : '',
+            nativePlace: profile.native_place || '',
+            politicalStatus: profile.political_status || '',
+            ethnicity: profile.ethnicity || '',
+            maritalStatus: profile.marital_status_name || '',
+            specialties: profile.specialties || '',
             schoolName: education.school_name || '',
             major: education.major || '',
             graduationDate: education.end_date || '',