Kaynağa Gözat

首页样式优化

wkw 6 ay önce
ebeveyn
işleme
0a35cdb5bd
3 değiştirilmiş dosya ile 139 ekleme ve 92 silme
  1. 97 70
      pages/index/index.vue
  2. 19 13
      pages/msg/im.vue
  3. 23 9
      pages/talentSearch/index.vue

+ 97 - 70
pages/index/index.vue

@@ -412,15 +412,17 @@
 							:refresher-threshold="80" refresher-background="#F2F2F7" refresher-default-style="white"
 							:refresher-triggered="isRefreshing" @refresherrefresh="handlePullDownRefresh"
 							@refresherpulling="onPullingDown" @scrolltolower="loadMore" scroll-with-animation="true">
-							<view class="qyList-box-item flex justify-center" v-for="(item, index) in datasList"
+							<view class="qyList-box-item flex" v-for="(item, index) in datasList"
 								:key="index"
 								@click="goNav('/pages/talentSearch/resumeDetail?resumesId=' + item.resumesId + '&postPushId=' + (jobSxTypeList.length > 0 ? jobSxTypeList[currentJobSx].id : ''), 'company')">
-								<!-- /pages/index/game/orderDet  -->
 								<view class="qyList-box-item-box">
-									<view class="qyList-box-item-info flex justify-between align-center">
+									<view class="qyList-box-item-info flex align-center">
+										<view class="qyList-box-item-info-r">
+											<image :src="item.userAvatar ? item.userAvatar : '../../static/logo.png'"
+												style="width: 72rpx;height: 72rpx;border-radius: 50%;" mode=""></image>
+										</view>
 										<view class="qyList-box-item-info-l">
-											<view class="online-name"
-												style="color: #212121;font-size: 38rpx;font-weight: 800;">
+											<view class="online-name">
 												{{ item.userName }}
 												<view class="online-txt"
 													:style="{ 'background': item.onlineStatus == 'ONLINE' ? 'rgba(29, 209, 104, 0.1)' : '#eee', 'color': item.onlineStatus == 'ONLINE' ? 'rgba(29, 209, 104, 1)' : '#999' }">
@@ -431,51 +433,22 @@
 												</view>
 											</view>
 											<view class="flex align-center flex-wrap"
-												style="color: #999999;font-size: 26rpx;margin-top: 10rpx;">
-												<text>{{ item.userAge }}岁</text>
-												<text style="margin-left: 20rpx;margin-right: 20rpx;">|</text>
-												<text>{{ item.resumesWorkExperience || 0 }}年</text>
-												<text style="margin-left: 20rpx;margin-right: 20rpx;">|</text>
-												<text>{{ item.degree }}</text>
-												<text style="margin-left: 20rpx;margin-right: 20rpx;">|</text>
+												style="color: #999999;font-size: 24rpx;margin-top: 8rpx;">
+												<text style="margin-right: 12rpx;">{{ item.userAge }}岁</text>
+												<text style="margin-right: 12rpx;">{{ item.resumesWorkExperience || 0 }}年</text>
+												<text style="margin-right: 12rpx;">{{ item.degree }}</text>
 												<text>期望{{ item.minSalary }}-{{ item.maxSalary }}元</text>
 											</view>
 										</view>
-										<view class="qyList-box-item-info-r">
-											<image :src="item.userAvatar ? item.userAvatar : '../../static/logo.png'"
-												style="width: 95rpx;height: 95rpx;border-radius: 50%;" mode=""></image>
-										</view>
 									</view>
-									<!-- 标签 -->
-									<view v-if="item.intentPostSkill" class="flex align-center flex-wrap" style="gap:8rpx;margin: 32rpx 0;">
-										<view v-for="(text,i) in parseSkills(item.intentPostSkill)" :key="i" class="skillTag">
-											{{text}}
-										</view>
-									</view>
-
+									
 									<view class="qyList-box-item-job flex align-center">
-										<image src="../../static/images/qi.png"
-											style="width: 30rpx;height: 32rpx;margin-right: 16rpx;" mode=""></image>
+										<image src="../../static/images/aixin.svg" class="job-icon" mode="aspectFit"></image>
 										<block v-if="item.companyName">
-											<view class="work-school">
-												<view class="txt-desc-box" v-if="item.companyName">
-													<view class="txt-desc">
-														{{ item.companyName ? item.companyName : '' }}
-													</view>
-													<view class="txt-desc">
-														{{ item.lastWorkStartTime ? item.lastWorkStartTime.slice(0, 10)
-															: ''
-														}}--{{
-															item.lastWorkEndTime ? item.lastWorkEndTime.slice(0, 10) : '' }}
-													</view>
-												</view>
-												<view class="txt-desc-box" v-if="item.school">
-													<view class="txt-desc">
-														{{ item.school ? item.school : '' }}
-													</view>
-													<view class="txt-desc">
-														{{ item.degree ? item.degree : '' }}
-													</view>
+											<view class="flex justify-between" style="flex:1">
+												<view class="work-school">
+													{{ item.companyName ? item.companyName : '' }} · {{ item.lastWorkPosition ? item.lastWorkPosition : '' }}
+													<view class="txt-desc">{{calculateWorkDuration(item.lastWorkStartTime,item.lastWorkEndTime)}}</view>
 												</view>
 											</view>
 										</block>
@@ -484,24 +457,28 @@
 										</block>
 									</view>
 									<view class="qyList-box-item-job flex align-center">
-										<u-icon name="heart-fill" color="#016BF6" size="30"
-											style="margin-right: 16rpx;">
-										</u-icon>
-										求职期望:{{ item.expectedPosition }}
+										<image src="../../static/images/xiangzi.svg" class="job-icon" mode="aspectFit"></image>
+										<block v-if="item.expectedPosition">
+											<view class="work-school">求职期望: {{ item.expectedPosition }}</view>
+										</block>
+									</view>
+									<!-- 跨境标签 -->
+									<view v-if="item.intentPostSkill" class="flex align-center flex-wrap" style="gap:8rpx;margin: 12rpx 0;">
+										<view v-for="(text,i) in parseSkills(item.intentPostSkill)" :key="i" class="skillTag">
+											{{text}}
+										</view>
 									</view>
-									<view class="resume-skills" v-if="item.skills && item.skills.length > 0">
-										<!-- 	  <text class="skills-label">技能标签:</text> -->
+									<!-- 技能标签 -->
+									<!-- <view class="resume-skills" v-if="item.skillName && item.skillName.length > 0">
 										<view class="skills-tags flex flex-wrap">
-											<text class="tag-item" v-for="(skill, skillIdx) in item.skills.split(',')"
+											<text class="tag-item" v-for="(skill, skillIdx) in item.skillName.split(',')"
 												:key="skillIdx">
 												{{ skill }}
 											</text>
 										</view>
-									</view>
-
-									<view class="qyList-box-item-rem" v-if="item.workContent">
-										优势:{{ item.workContent }}
-									</view>
+									</view> -->
+									<!-- 工作经历 -->
+									<view class="qyList-box-item-rem">{{item.lastWorkContent}}</view>
 								</view>
 							</view>
 							<nomore v-if="datasList.length > 0 && page >= totlo"></nomore>
@@ -970,6 +947,28 @@ export default {
 
 	},
 	methods: {
+		calculateWorkDuration(start, end) {
+		  if (!start || !end) return ''
+		
+		  const startDate = new Date(start)
+		  const endDate = new Date(end)
+		
+		  if (endDate < startDate) return ''
+		
+		  let years = endDate.getFullYear() - startDate.getFullYear()
+		  let months = endDate.getMonth() - startDate.getMonth()
+		
+		  if (months < 0) {
+		    years -= 1
+		    months += 12
+		  }
+		
+		  let result = ''
+		  if (years > 0) result += years + '年'
+		  if (months > 0) result += months + '个月'
+		
+		  return result || '0个月'
+		},
 		parseSkills(str) {
 			if (!str) return [];
 			// 统一替换中文逗号为英文逗号
@@ -2036,12 +2035,20 @@ export default {
 	justify-content: space-between;
 	align-items: center;
 	flex: 1;
+	color: rgba(156, 164, 171, 1);
+	font-family: DM Sans;
+	font-size: 12px;
+	font-weight: 400;
 }
 
 .online-name {
 	display: flex;
 	align-items: center;
 	gap: 12rpx;
+	font-family: DM Sans;
+	color: rgba(51, 51, 51, 1);
+	font-size: 28rpx;
+	font-weight: 500;
 }
 
 .online-txt {
@@ -2973,12 +2980,14 @@ page {
 			gap: 16rpx; // 标签间距
 
 			.tag-item {
-				background: #F6F6F6;
-				color: #666666;
-				font-size: 22rpx;
-				padding: 8rpx 20rpx;
+				padding: 8rpx;
 				border-radius: 8rpx;
-				line-height: 32rpx;
+				background: rgba(198, 198, 198, 0.1);
+				color: rgba(153, 153, 153, 1);
+				font-family: DM Sans;
+				font-size: 20rpx;
+				font-weight: 400;
+				line-height: 20rpx;
 			}
 		}
 	}
@@ -2989,19 +2998,23 @@ page {
 
 		.qyList-box-item {
 			width: 100%;
+			padding: 36rpx;
 			// height: 400rpx;
-			padding-bottom: 40rpx;
+			// padding-bottom: 40rpx;
 			background-color: #ffffff;
-			border-radius: 24rpx;
-			margin-bottom: 20rpx;
+			border-radius: 12rpx;
+			margin-bottom: 12rpx;
 
 			.qyList-box-item-box {
-				width: 626rpx;
+				width: 100%;
 				height: 100%;
 			}
 
 			.qyList-box-item-info {
-				margin-top: 40rpx;
+				// margin-top: 40rpx;
+			}
+			.qyList-box-item-info-r{
+				margin-right: 20rpx;
 			}
 
 			.qyList-box-item-job {
@@ -3009,13 +3022,27 @@ page {
 				color: #121212;
 				font-size: 28rpx;
 				font-weight: 500;
-				margin-top: 20rpx;
+				margin-top: 12rpx;
+				.job-icon {
+					width: 40rpx;
+					height: 40rpx;
+					margin-right: 8rpx;
+				}
 			}
 
 			.qyList-box-item-rem {
-				color: #999999;
-				font-size: 26rpx;
-				margin-top: 20rpx;
+				color: rgba(97, 110, 124, 1);
+				font-family: DM Sans;
+				font-size: 24rpx;
+				font-weight: 400;
+				line-height: 32rpx;
+				display: -webkit-box;
+				overflow: hidden;
+				text-overflow: ellipsis;
+				-webkit-box-orient: vertical;
+				word-break: break-all;
+				-webkit-line-clamp: 2;
+				white-space: pre-wrap;
 			}
 		}
 	}

+ 19 - 13
pages/msg/im.vue

@@ -2121,19 +2121,25 @@
 				this.setChatSave(1);
 			},
 			getChangYong() {
-				this.$Request.getT('/app/message/selectMessageByUserId?page=1&limit=100&state=20')
-					.then(res => {
-						if (res.code == 0) {
-							this.changYongList = [{label:'你好啊,可以聊一聊~',value:0}];
-							res.data.list.forEach(d => {
-								let data = {
-									label: d.content,
-									value: d.id
-								}
-								this.changYongList.push(data);
-							});
-						}
-					});
+				let state = 0
+				if(this.userType == 1){
+					state = 70
+				}else{
+					state = 80
+				}
+				this.$Request.getT(`/app/message/selectMessageByUserId?page=1&limit=100&state=${state}`)
+				.then(res => {
+					if (res.code == 0) {
+						this.changYongList = [{label:'你好啊,可以聊一聊~',value:0}];
+						res.data.list.forEach(d => {
+							let data = {
+								label: d.content,
+								value: d.id
+							}
+							this.changYongList.push(data);
+						});
+					}
+				});
 			},
 			goGuanZhu(item) {
 				return

+ 23 - 9
pages/talentSearch/index.vue

@@ -91,16 +91,16 @@
 						<text class="expectation-text">求职期望: {{ talent.expectedPosition }}</text>
 					</view>
 
-					<!-- 技能标签 -->
-					<view class="skill-tags">
-						<view class="skill-tag" v-for="(skill, skillIndex) in talent.skills" :key="skillIndex">
-							{{ skill }}
+					<!-- 跨境标签 -->
+					<view class="skill-tags" v-if="talent.intentPostSkill">
+						<view class="skill-tag" v-for="(text,i) in parseSkills(talent.intentPostSkill)" :key="i">
+							{{ text }}
 						</view>
 					</view>
 
-					<!-- 工作描述 -->
+					<!-- 工作经历 -->
 					<view class="job-description">
-						<text class="description-text">{{ talent.adv }}</text>
+						<text class="description-text">{{ talent.lastWorkContent }}</text>
 					</view>
 				</view>
 			</view>
@@ -285,6 +285,19 @@
 
 		},
 		methods: {
+			parseSkills(str) {
+				if (!str) return [];
+				// 统一替换中文逗号为英文逗号
+				str = str.replace(/,/g, ',');
+				// 先判断用什么分隔符
+				if (str.includes('/')) {
+					return str.split('/').filter(Boolean);
+				} else if (str.includes(',')) {
+					return str.split(',').filter(Boolean);
+				}
+				// 没有分隔符,直接返回数组
+				return [str];
+			},
 			// 返回上一页
 			goBack() {
 				uni.navigateBack()
@@ -1117,8 +1130,8 @@
 		.skill-tags {
 			display: flex;
 			flex-wrap: wrap;
-			gap: 10rpx;
-			margin-bottom: 16rpx;
+			gap: 8rpx;
+			margin: 12rpx 0;
 
 			.skill-tag {
 				padding: 8rpx;
@@ -1135,7 +1148,7 @@
 		}
 
 		.job-description {
-			margin-bottom: 12rpx;
+			// margin-bottom: 12rpx;
 			width: 100%;
 
 			.description-text {
@@ -1154,6 +1167,7 @@
 				/* 隐藏超出内容 */
 				text-overflow: ellipsis;
 				/* 显示省略号 */
+				white-space: pre-wrap;
 
 			}
 		}