Commit 2bd13cbc by Lin

perf:空值展示优化

1 parent adae0308
......@@ -199,12 +199,20 @@ Page({
recruitment.createdDate = this.formatDate(recruitment.createdDate)
}
// 根据 businessType 动态过滤招聘信息配置
// 当 businessType == 1 时,显示拒绝理由;否则过滤掉拒绝理由项
// 根据字段值是否存在和业务类型动态过滤招聘信息配置
const filteredRecruitmentInfoConfig = RECRUITMENT_INFO_CONFIG.filter(item => {
// 特殊处理:拒绝理由字段仅在businessType为1时显示
if (item.field === 'recallReason') {
return recruitment.businessType == 1
return recruitment.businessType == 1 && recruitment.recallReason
}
// 如果字段值不存在或为空字符串,则不显示该字段
if (recruitment[item.field] === undefined ||
recruitment[item.field] === null ||
recruitment[item.field] === '') {
return false
}
return true
})
......
......@@ -247,9 +247,6 @@ page {
}
// 招聘信息模块
.recruit_info {
.card {
min-height: var(--fontSize428);
}
.info_item {
display: flex;
justify-content: space-between;
......
Markdown is supported
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!