This commit is contained in:
BianLzhaoMin 2025-10-31 17:24:14 +08:00
parent f3bb480013
commit d3bf33adbc
1 changed files with 3 additions and 0 deletions

View File

@ -272,5 +272,8 @@ export function desensitizeIdNumber(idNumber) {
// 对手机号码进行脱敏 // 对手机号码进行脱敏
export function desensitizePhone(phone) { export function desensitizePhone(phone) {
if (!phone) {
return '-'
}
return phone.replace(/^(\d{3})\d{4}(\d{4})$/, '$1****$2') return phone.replace(/^(\d{3})\d{4}(\d{4})$/, '$1****$2')
} }