lyuis 7 달 전
부모
커밋
cee6af1a64
7개의 변경된 파일488개의 추가작업 그리고 429개의 파일을 삭제
  1. 34 0
      common/queue.js
  2. 8 2
      package/jobIntention/basicInfo.vue
  3. 2 2
      pages/msg/im.vue
  4. 1 0
      pages/my/index.vue
  5. 2 0
      pages/my/jobApplicant/workRecord.vue
  6. 1 0
      pages/my/ruleCenter.vue
  7. 440 425
      pages/my/workExperience.vue

+ 34 - 0
common/queue.js

@@ -387,4 +387,38 @@ module.exports = {
 		    console.log('tabbar 更新完成');
 		  },100);
 	},
+	// 核心年龄计算函数
+	        calculateAgeFromBirthday:function(birthday) {
+	            const birthDate = new Date(birthday);
+	            const currentDate = new Date();
+	            
+	            // 验证日期有效性
+	            if (isNaN(birthDate.getTime())) {
+	                throw new Error('无效的生日日期');
+	            }
+	            
+	            if (birthDate > currentDate) {
+	                throw new Error('生日日期不能晚于当前日期');
+	            }
+	            
+	            let years = currentDate.getFullYear() - birthDate.getFullYear();
+	            let months = currentDate.getMonth() - birthDate.getMonth();
+	            let days = currentDate.getDate() - birthDate.getDate();
+	            
+	            // 处理天数负数情况
+	            if (days < 0) {
+	                months--;
+	                // 获取上个月的天数
+	                const lastMonth = new Date(currentDate.getFullYear(), currentDate.getMonth(), 0);
+	                days += lastMonth.getDate();
+	            }
+	            
+	            // 处理月份负数情况
+	            if (months < 0) {
+	                years--;
+	                months += 12;
+	            }
+	            
+	            return years;
+	        }
 };

+ 8 - 2
package/jobIntention/basicInfo.vue

@@ -253,7 +253,13 @@
 						title: "联系电话不能为空",
 						icon: "none"
 					})
-				} else {
+				} else if(!this.birthDateText){
+					uni.showToast({
+						title: "生日不能为空",
+						icon: "none"
+					})
+				}else{
+					this.age=this.$queue.calculateAgeFromBirthday(this.birthDateText)||0
 					let that = this
 					uni.showModal({
 						title: '温馨提示',
@@ -288,7 +294,7 @@
 			setResume() {
 				let data={
 					resumesStatus:this.selectedJobStatus,
-					resumesPhone: that.phone,
+					resumesPhone: this.phone,
 					birthday:this.birthDateText,
 					ifExp:this.ifExp
 				}

+ 2 - 2
pages/msg/im.vue

@@ -193,7 +193,7 @@
 						<view class="talent-content">
 							<!-- 头像和基本信息 -->
 							<view class="talent-header">
-								<image :src="resumesInfo.avatar" class="talent-avatar" mode="aspectFill"></image>
+								<image :src="resumesInfo&&resumesInfo.avatar||'../../static/logo.png'" class="talent-avatar" mode="aspectFill"></image>
 								<view class="talent-info">
 									<view class="talent-name-section">
 										<view class="talent-name">期望:{{ resumesInfo.intentionRuleClassifyName }} <text class="talentRange">{{resumesInfo.intentionSalaryRange}}</text></view>
@@ -228,7 +228,7 @@
 				
 							<!-- 技能标签 -->
 							<view class="skill-tags">
-								<view class="skill-tag" v-for="(skill, skillIndex) in resumesInfo.resumesListDtoList.intentIndustry&&resumesInfo.resumesListDtoList.intentIndustry.split('/')||[]" :key="skillIndex">
+								<view class="skill-tag" v-for="(skill, skillIndex) in resumesInfo.resumesListDtoList&&resumesInfo.resumesListDtoList.intentIndustry&&resumesInfo.resumesListDtoList.intentIndustry.split('/')||[]" :key="skillIndex">
 									{{ skill }}
 								</view>
 							</view>

+ 1 - 0
pages/my/index.vue

@@ -1935,6 +1935,7 @@
 						width: 128rpx;
 						height: 128rpx;
 						border-radius: 50%;
+						display: block;
 					}
 				}
 

+ 2 - 0
pages/my/jobApplicant/workRecord.vue

@@ -464,9 +464,11 @@ export default {
         uni.showToast({ title: "请输入出生年月", icon: "none" });
         return;
       }
+	  let age=this.$queue.calculateAgeFromBirthday(this.formData.birthDate)||0
 		let data={
 			avatar:this.formData.avatar,
 			userName:this.formData.name,
+			age,
 			sex:this.formData.gender,
 			phone:this.formData.phone
 		}

+ 1 - 0
pages/my/ruleCenter.vue

@@ -138,6 +138,7 @@ export default {
 
     // 点击轮播图
     handleBannerClick(item) {
+		return;
       if (item.link) {
         uni.navigateTo({
           url: item.link,

파일 크기가 너무 크기때문에 변경 상태를 표시하지 않습니다.
+ 440 - 425
pages/my/workExperience.vue


이 변경점에서 너무 많은 파일들이 변경되어 몇몇 파일들은 표시되지 않았습니다.