Browse Source

修改内容

yangg 3 weeks ago
parent
commit
6b9acbb327

+ 3 - 3
api/user.js

@@ -22,13 +22,13 @@ export function wxLogin(loginParams) {
       province: loginParams.userInfo?.province || '',
       province: loginParams.userInfo?.province || '',
       city: loginParams.userInfo?.city || '',
       city: loginParams.userInfo?.city || '',
       country: loginParams.userInfo?.country || '',
       country: loginParams.userInfo?.country || '',
-      tenant_id: uni.getStorageSync('tenant_id') ||JSON.parse(uni.getStorageSync('userInfo')).tenant_id || 1,
+      tenant_id: uni.getStorageSync('tenant_id') ||(() => { try { const s = uni.getStorageSync('userInfo'); return s ? (JSON.parse(s).tenant_id || 1) : 1; } catch { return 1; } })(),
     },
     },
     signature: loginParams.signature || '',
     signature: loginParams.signature || '',
     rawData: loginParams.rawData || '',
     rawData: loginParams.rawData || '',
     encryptedData: loginParams.encryptedData || '',
     encryptedData: loginParams.encryptedData || '',
     iv: loginParams.iv || '',
     iv: loginParams.iv || '',
-    tenant_id: uni.getStorageSync('tenant_id') ||JSON.parse(uni.getStorageSync('userInfo')).tenant_id || 1,
+    tenant_id: uni.getStorageSync('tenant_id') ||(() => { try { const s = uni.getStorageSync('userInfo'); return s ? (JSON.parse(s).tenant_id || 1) : 1; } catch { return 1; } })(),
     _csrf: csrfToken // 添加 CSRF token
     _csrf: csrfToken // 添加 CSRF token
   };
   };
   
   
@@ -102,7 +102,7 @@ export const getJobList = (params = {}) => {
     limit: 50,
     limit: 50,
     searchTerms: '',
     searchTerms: '',
     status: '',
     status: '',
-    tenant_id: uni.getStorageSync('tenant_id') || JSON.parse(uni.getStorageSync('userInfo')).tenant_id ||1
+    tenant_id: uni.getStorageSync('tenant_id') ||(() => { try { const s = uni.getStorageSync('userInfo'); return s ? (JSON.parse(s).tenant_id || 1) : 1; } catch { return 1; } })()
   };
   };
   
   
   // 合并默认参数和传入参数
   // 合并默认参数和传入参数

+ 20 - 18
pages/Personal/Personal.vue

@@ -1004,7 +1004,8 @@ import { apiBaseUrl } from '@/common/config.js';
 				return Object.keys(this.safeFamilyFieldsConfig).length === 0 || this.safeFamilyFieldsConfig.phone?.visible !== false;
 				return Object.keys(this.safeFamilyFieldsConfig).length === 0 || this.safeFamilyFieldsConfig.phone?.visible !== false;
 			},
 			},
 			showFamilyisEmergency(){
 			showFamilyisEmergency(){
-				this.safeFamilyFieldsConfig.family_contact_person?.visible !== false;
+				// this.safeFamilyFieldsConfig.family_contact_person?.visible !== false;
+				return Object.keys(this.safeFamilyFieldsConfig).length === 0 || this.safeFamilyFieldsConfig.family_contact_person?.visible !== false;
 			},
 			},
 			// 教育经历字段显示控制
 			// 教育经历字段显示控制
 			showEducationTimeField() {
 			showEducationTimeField() {
@@ -1036,7 +1037,7 @@ import { apiBaseUrl } from '@/common/config.js';
 				return Object.keys(this.safeWorkFieldsConfig).length === 0 || this.safeWorkFieldsConfig.position?.visible !== false;
 				return Object.keys(this.safeWorkFieldsConfig).length === 0 || this.safeWorkFieldsConfig.position?.visible !== false;
 			},
 			},
 			showWorkMonthlySalary(){
 			showWorkMonthlySalary(){
-				return this.safeWorkFieldsConfig.monthly_income?.visible
+				return this.safeWorkFieldsConfig.monthly_salary?.visible
 			},
 			},
 			showWorkSupervisor(){
 			showWorkSupervisor(){
 				return this.safeWorkFieldsConfig.direct_supervisor?.visible 
 				return this.safeWorkFieldsConfig.direct_supervisor?.visible 
@@ -1349,10 +1350,11 @@ import { apiBaseUrl } from '@/common/config.js';
 				// if (this.shouldValidateField('phone', 'family') && !this.familyMemberForm.phone) {
 				// if (this.shouldValidateField('phone', 'family') && !this.familyMemberForm.phone) {
 				// 	this.familyMemberErrors.phone = '请输入联系电话';
 				// 	this.familyMemberErrors.phone = '请输入联系电话';
 				// 	isValid = false;
 				// 	isValid = false;
-				// } else if (this.shouldValidateField('phone', 'family') && this.familyMemberForm.phone && !/^1[3-9]\d{9}$/.test(this.familyMemberForm.phone)) {
-				// 	this.familyMemberErrors.phone = '请输入正确的手机号';
-				// 	isValid = false;
-				// }
+				// } else 
+				if (this.shouldValidateField('phone', 'family') && this.familyMemberForm.phone && !/^1[3-9]\d{9}$/.test(this.familyMemberForm.phone)) {
+					this.familyMemberErrors.phone = '请输入正确的手机号';
+					isValid = false;
+				}
 				
 				
 				if (!isValid) {
 				if (!isValid) {
 					uni.showToast({
 					uni.showToast({
@@ -1654,25 +1656,25 @@ import { apiBaseUrl } from '@/common/config.js';
 					isValid = false;
 					isValid = false;
 				}
 				}
 
 
-				// if (this.shouldValidateField('department', 'work') && !this.workForm.department) {
-				// 	this.workErrors.department = '请输入任职部门';
-				// 	isValid = false;
-				// }
+				if (this.shouldValidateField('department', 'work') && !this.workForm.department) {
+					this.workErrors.department = '请输入任职部门';
+					isValid = false;
+				}
 
 
-				// if (this.shouldValidateField('position', 'work') && !this.workForm.position) {
-				// 	this.workErrors.position = '请输入担任职务';
-				// 	isValid = false;
-				// }
+				if (this.shouldValidateField('position', 'work') && !this.workForm.position) {
+					this.workErrors.position = '请输入担任职务';
+					isValid = false;
+				}
 
 
 				if (this.shouldValidateField('employeeCount', 'work') && !this.workForm.employeeCount) {
 				if (this.shouldValidateField('employeeCount', 'work') && !this.workForm.employeeCount) {
 					this.workErrors.employeeCount = '请输入单位人数';
 					this.workErrors.employeeCount = '请输入单位人数';
 					isValid = false;
 					isValid = false;
 				}
 				}
 
 
-				// if (this.shouldValidateField('monthlySalary', 'work') && !this.workForm.monthlySalary) {
-				// 	this.workErrors.monthlySalary = '请输入月薪';
-				// 	isValid = false;
-				// }
+				if (this.shouldValidateField('monthlySalary', 'work') && !this.workForm.monthlySalary) {
+					this.workErrors.monthlySalary = '请输入月总收入';
+					isValid = false;
+				}
 
 
 				// if (this.shouldValidateField('supervisor', 'work') && !this.workForm.supervisor) {	
 				// if (this.shouldValidateField('supervisor', 'work') && !this.workForm.supervisor) {	
 				// 	this.workErrors.supervisor = '请输入直属上级';
 				// 	this.workErrors.supervisor = '请输入直属上级';

+ 3 - 3
pages/identity-verify/identity-verify.vue

@@ -5185,10 +5185,10 @@ export default {
           let pageName = 'camera页面';
           let pageName = 'camera页面';
           console.log('当前配置数据:', hasScoringQuestions);
           console.log('当前配置数据:', hasScoringQuestions);
           // 根据配置决定跳转页面
           // 根据配置决定跳转页面
-          if (hasChoiceQuestions) {
-            // 如果启用了评分题,跳转到posture-guide页面
+          if (hasChoiceQuestions || hasScoringQuestions) {
+            // 选择题或评分题任一开启,跳转到camera页面
             targetUrl = '/pages/camera/camera';
             targetUrl = '/pages/camera/camera';
-            pageName = 'posture-guide页面';
+            pageName = 'camera页面';
           }else if(hasPostureDetection){
           }else if(hasPostureDetection){
             targetUrl = '/pages/posture-guide/posture-guide';
             targetUrl = '/pages/posture-guide/posture-guide';
             pageName = 'posture-guide页面';
             pageName = 'posture-guide页面';

+ 24 - 3
unpackage/dist/dev/mp-weixin/api/user.js

@@ -13,13 +13,27 @@ function wxLogin(loginParams) {
       province: ((_d = loginParams.userInfo) == null ? void 0 : _d.province) || "",
       province: ((_d = loginParams.userInfo) == null ? void 0 : _d.province) || "",
       city: ((_e = loginParams.userInfo) == null ? void 0 : _e.city) || "",
       city: ((_e = loginParams.userInfo) == null ? void 0 : _e.city) || "",
       country: ((_f = loginParams.userInfo) == null ? void 0 : _f.country) || "",
       country: ((_f = loginParams.userInfo) == null ? void 0 : _f.country) || "",
-      tenant_id: common_vendor.index.getStorageSync("tenant_id") || JSON.parse(common_vendor.index.getStorageSync("userInfo")).tenant_id || 1
+      tenant_id: common_vendor.index.getStorageSync("tenant_id") || (() => {
+        try {
+          const s = common_vendor.index.getStorageSync("userInfo");
+          return s ? JSON.parse(s).tenant_id || 1 : 1;
+        } catch {
+          return 1;
+        }
+      })()
     },
     },
     signature: loginParams.signature || "",
     signature: loginParams.signature || "",
     rawData: loginParams.rawData || "",
     rawData: loginParams.rawData || "",
     encryptedData: loginParams.encryptedData || "",
     encryptedData: loginParams.encryptedData || "",
     iv: loginParams.iv || "",
     iv: loginParams.iv || "",
-    tenant_id: common_vendor.index.getStorageSync("tenant_id") || JSON.parse(common_vendor.index.getStorageSync("userInfo")).tenant_id || 1,
+    tenant_id: common_vendor.index.getStorageSync("tenant_id") || (() => {
+      try {
+        const s = common_vendor.index.getStorageSync("userInfo");
+        return s ? JSON.parse(s).tenant_id || 1 : 1;
+      } catch {
+        return 1;
+      }
+    })(),
     _csrf: csrfToken
     _csrf: csrfToken
     // 添加 CSRF token
     // 添加 CSRF token
   };
   };
@@ -42,7 +56,14 @@ const getJobList = (params = {}) => {
     limit: 50,
     limit: 50,
     searchTerms: "",
     searchTerms: "",
     status: "",
     status: "",
-    tenant_id: common_vendor.index.getStorageSync("tenant_id") || JSON.parse(common_vendor.index.getStorageSync("userInfo")).tenant_id || 1
+    tenant_id: common_vendor.index.getStorageSync("tenant_id") || (() => {
+      try {
+        const s = common_vendor.index.getStorageSync("userInfo");
+        return s ? JSON.parse(s).tenant_id || 1 : 1;
+      } catch {
+        return 1;
+      }
+    })()
   };
   };
   ({ ...defaultParams, ...params });
   ({ ...defaultParams, ...params });
   return utils_request.http.get("/api/system/job/list", defaultParams);
   return utils_request.http.get("/api/system/job/list", defaultParams);

+ 18 - 2
unpackage/dist/dev/mp-weixin/pages/Personal/Personal.js

@@ -380,7 +380,7 @@ const _sfc_main = {
     },
     },
     showFamilyisEmergency() {
     showFamilyisEmergency() {
       var _a;
       var _a;
-      ((_a = this.safeFamilyFieldsConfig.family_contact_person) == null ? void 0 : _a.visible) !== false;
+      return Object.keys(this.safeFamilyFieldsConfig).length === 0 || ((_a = this.safeFamilyFieldsConfig.family_contact_person) == null ? void 0 : _a.visible) !== false;
     },
     },
     // 教育经历字段显示控制
     // 教育经历字段显示控制
     showEducationTimeField() {
     showEducationTimeField() {
@@ -422,7 +422,7 @@ const _sfc_main = {
     },
     },
     showWorkMonthlySalary() {
     showWorkMonthlySalary() {
       var _a;
       var _a;
-      return (_a = this.safeWorkFieldsConfig.monthly_income) == null ? void 0 : _a.visible;
+      return (_a = this.safeWorkFieldsConfig.monthly_salary) == null ? void 0 : _a.visible;
     },
     },
     showWorkSupervisor() {
     showWorkSupervisor() {
       var _a;
       var _a;
@@ -690,6 +690,10 @@ const _sfc_main = {
         this.familyMemberErrors.name = "请输入姓名";
         this.familyMemberErrors.name = "请输入姓名";
         isValid = false;
         isValid = false;
       }
       }
+      if (this.shouldValidateField("phone", "family") && this.familyMemberForm.phone && !/^1[3-9]\d{9}$/.test(this.familyMemberForm.phone)) {
+        this.familyMemberErrors.phone = "请输入正确的手机号";
+        isValid = false;
+      }
       if (!isValid) {
       if (!isValid) {
         common_vendor.index.showToast({
         common_vendor.index.showToast({
           title: "请完善家庭成员信息",
           title: "请完善家庭成员信息",
@@ -946,10 +950,22 @@ const _sfc_main = {
         this.workErrors.companyName = "请输入单位名称";
         this.workErrors.companyName = "请输入单位名称";
         isValid = false;
         isValid = false;
       }
       }
+      if (this.shouldValidateField("department", "work") && !this.workForm.department) {
+        this.workErrors.department = "请输入任职部门";
+        isValid = false;
+      }
+      if (this.shouldValidateField("position", "work") && !this.workForm.position) {
+        this.workErrors.position = "请输入担任职务";
+        isValid = false;
+      }
       if (this.shouldValidateField("employeeCount", "work") && !this.workForm.employeeCount) {
       if (this.shouldValidateField("employeeCount", "work") && !this.workForm.employeeCount) {
         this.workErrors.employeeCount = "请输入单位人数";
         this.workErrors.employeeCount = "请输入单位人数";
         isValid = false;
         isValid = false;
       }
       }
+      if (this.shouldValidateField("monthlySalary", "work") && !this.workForm.monthlySalary) {
+        this.workErrors.monthlySalary = "请输入月总收入";
+        isValid = false;
+      }
       if (!isValid) {
       if (!isValid) {
         common_vendor.index.showToast({
         common_vendor.index.showToast({
           title: "请完善工作经历信息",
           title: "请完善工作经历信息",

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

@@ -3680,9 +3680,9 @@ const _sfc_main = {
         let targetUrl = "/pages/camera/camera";
         let targetUrl = "/pages/camera/camera";
         let pageName = "camera页面";
         let pageName = "camera页面";
         console.log("当前配置数据:", hasScoringQuestions);
         console.log("当前配置数据:", hasScoringQuestions);
-        if (hasChoiceQuestions) {
+        if (hasChoiceQuestions || hasScoringQuestions) {
           targetUrl = "/pages/camera/camera";
           targetUrl = "/pages/camera/camera";
-          pageName = "posture-guide页面";
+          pageName = "camera页面";
         } else if (hasPostureDetection) {
         } else if (hasPostureDetection) {
           targetUrl = "/pages/posture-guide/posture-guide";
           targetUrl = "/pages/posture-guide/posture-guide";
           pageName = "posture-guide页面";
           pageName = "posture-guide页面";

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

@@ -10,7 +10,7 @@
         {
         {
           "name": "pages/index/index",
           "name": "pages/index/index",
           "pathName": "pages/index/index",
           "pathName": "pages/index/index",
-          "query": "scene=1",
+          "query": "scene=13",
           "launchMode": "default",
           "launchMode": "default",
           "scene": 1047
           "scene": 1047
         },
         },