/** * 手机号脱敏工具(受系统配置 privacyMobileMask 控制) */ export function maskMobileValue(mobile) { if (mobile == null || mobile === '') return '' const m = String(mobile).trim() if (!m) return '' if (m.length < 7) return '****' return `${m.slice(0, 3)}****${m.slice(-4)}` } export function formatMobileDisplay(mobile, enabled) { const raw = mobile == null ? '' : String(mobile).trim() if (!raw) return '' return Number(enabled) === 1 ? maskMobileValue(raw) : raw }