瀏覽代碼

首页添加展开收起功能

wkw 7 月之前
父節點
當前提交
0ea9c8fdfc
共有 2 個文件被更改,包括 31 次插入28 次删除
  1. 25 28
      pages/index/index.vue
  2. 6 0
      pages/my/onlineResume.vue

+ 25 - 28
pages/index/index.vue

@@ -321,7 +321,7 @@
 									<image src="../../static/images/index/Attachment.svg" class="attachment-icon" />
 								</view> -->
 
-								<view class="qySx-box-r flex align-center"
+								<view class="qySx-box-r flex align-center" v-if="isExpandedQY"
 									@click="goNavss('/pages/my/jobPosting?companyId=' + companyId + '&status=' + companyStatus + '&companyName=' + companyName)">
 									<image src="../../static/images/index/Attachment.svg" class="attachment-icon" />
 								</view>
@@ -330,7 +330,7 @@
 
 
 							<!-- 第二行:筛选 -->
-							<view class="qySx-sx-box flex justify-between align-center">
+							<view class="qySx-sx-box flex justify-between align-center" v-if="isExpandedQY">
 								<!-- 分类 -->
 								<view class="qySx-sx-box-l flex align-center">
 									<view class="qySx-sx-box-l-i" :class="currentJobSxs == index ? 'active3' : ''"
@@ -358,7 +358,7 @@
 							</view>
 							
 							<!-- 请筛选牛人的跨境标签 -->
-							<view class="direction-tip">
+							<view class="direction-tip" v-if="isExpandedQY">
 								<view class="direction-tip-title">请筛选牛人的跨境标签</view>
 								<view class="direction-tip-subtitle">跨境标签将用于为您推荐更匹配的牛人</view>
 							
@@ -375,6 +375,11 @@
 									</view>
 								</view>
 							</view>
+							
+							<!-- 展开收起 -->
+							 <view style="text-align: right;" @click="isExpandedQY = !isExpandedQY">
+								<u-icon :name="isExpandedQY ? 'arrow-up' : 'arrow-down'" color="#016bf6"></u-icon>
+							</view>
 						</view>
 					</view>
 				</u-sticky>
@@ -443,7 +448,7 @@
 									</view>
 									<!-- 标签 -->
 									<view v-if="item.intentPostSkill" class="flex align-center flex-wrap" style="gap:8rpx;margin: 32rpx 0;">
-										<view v-for="(text, i) in (item.intentPostSkill ? item.intentPostSkill.split('/') : [])" :key="i" class="skillTag">
+										<view v-for="(text,i) in parseSkills(item.intentPostSkill)" :key="i" class="skillTag">
 											{{text}}
 										</view>
 									</view>
@@ -601,6 +606,7 @@ export default {
 			XCXIsSelect: '是',
 			bannerList: [], //企业端轮播图
 			isExpanded: true, // 控制展开/收起状态
+			isExpandedQY:true,
 			bannerListuser: [], //用户端轮播图
 			gridlist: [], //用户端分类
 			gongao: [], //公告
@@ -715,7 +721,7 @@ export default {
 						title: '加载中'
 					})
 					this.page = 1
-					this.getPeopList()
+					this.getCompanyClassify()
 				}
 			}
 		}
@@ -843,22 +849,6 @@ export default {
 		uni.$off('updateIndexType')
 		uni.$off('skillsUpdated')
 	},
-	//加载更多
-	// onReachBottom() {
-	// 	if (this.page < this.totlo) {
-	// 		this.page += 1
-	// 		if (this.userType == 1) {
-	// 			if (this.current != this.typeList.length - 1) {
-	// 				this.getUserList()
-	// 			} else {
-	// 				this.getComanyList()
-	// 			}
-	// 		} else {
-	// 			this.getPeopList()
-	// 		}
-
-	// 	}
-	// },
 	onHide() {
 		//离开页面时关闭吸顶功能,用于处理h5环境运行下'bottom' of null报错的问题
 		this.enable = false
@@ -976,15 +966,23 @@ export default {
 			} else {
 				this.getCompanyClassify()
 			}
-			// if (this.userType == 1) { //用户端岗位
-			// 	that.getPostType();
-			// } else { //企业端简历
-			// 	that.getPeopList();
-			// }
 		}
 
 	},
 	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];
+		},
 		selectJob(job, index) {
 			this.currentJobSx = index
 			this.currentRuleClassifyId = job.ruleClassifyId
@@ -1486,7 +1484,7 @@ export default {
 				data.companyId = uni.getStorageSync('companyId')
 
 			this.$Request.getT('/app/postPush/getCompanyClassify', data).then(res => {
-				if (res.code === 0) {
+				if (res.code === 0 && res.data.length > 0) {
 					let arr = []
 					let tagMap = {}
 
@@ -1544,7 +1542,6 @@ export default {
 					this.positionTag =
 						this.positionTagMap[this.currentRuleClassifyId] ||
 						[{ id: '不限', name: '不限' }]
-
 					this.getPeopList()
 				}
 			})

+ 6 - 0
pages/my/onlineResume.vue

@@ -134,9 +134,14 @@
 										<view class="company-name">{{ item.companyName }}</view>
 										<view class="work-period">{{ it.startTime }}-{{ it.endTime }}</view>
 									</view>
+									<view style="margin-bottom: 10rpx;font-size: 22rpx;">工作内容:</view>
 									<view class="job-description">
 										{{ it.workContent }}
 									</view>
+									<view style="margin: 12rpx 0;font-size: 22rpx;">工作业绩</view>
+									<view class="job-description">
+										{{it.workPerformance}}
+									</view>
 									<view class="skill-tags">
 										<view class="tag" v-for="skill in it.skills">{{ skill }}</view>
 									</view>
@@ -1027,6 +1032,7 @@ export default {
 						line-height: 24rpx;
 						letter-spacing: 0%;
 						text-align: left;
+						white-space: pre-wrap;
 					}
 
 					.skill-tags {