修改了样式

This commit is contained in:
lik
2026-10-18 22:14:49 +08:00
parent ed36a0db0a
commit 031227710d
14 changed files with 384 additions and 356 deletions
+17 -7
View File
@@ -59,23 +59,33 @@ Page({
const profile = item.profile || {}
const health = item.health || {}
// 元信息行只收非空项(空值连同分隔线一起消失,不留「未填写」噪音),
// 顺序:出生年月 → 联系电话 → 证件号(脱敏)
const metaList = []
if (profile.birth) {
metaList.push(profile.birth)
}
if (profile.mobile) {
metaList.push(profile.mobile)
}
if (profile.idnumber) {
metaList.push(this.maskIdNumber(profile.idnumber))
}
return {
_id: item._id,
// 首字牌取姓氏首字;无姓名时 wxml 退到 user 图标
initial: (profile.name || '').slice(0, 1),
name: profile.name || '未命名',
sexText: profile.sex === 'male' ? '男' : (profile.sex === 'female' ? '女' : ''),
birth: profile.birth || '',
mobile: profile.mobile || '',
idnumberText: this.maskIdNumber(profile.idnumber),
metaList,
remark: health.remark || ''
}
},
// 证件号脱敏:仅保留前 4 位与后 4 位
// 证件号脱敏:仅保留前 4 位与后 4 位(只在有值时调用)
maskIdNumber(idnumber) {
const value = String(idnumber || '')
if (!value) {
return '未填写'
}
if (value.length <= 8) {
return value
}