From d3bf33adbc71621c422d8ba99f1a036de3aafe15 Mon Sep 17 00:00:00 2001 From: BianLzhaoMin <11485688+bianliangzhaomin123@user.noreply.gitee.com> Date: Fri, 31 Oct 2025 17:24:14 +0800 Subject: [PATCH] =?UTF-8?q?=E4=BC=98=E5=8C=96?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/utils/bonus.js | 3 +++ 1 file changed, 3 insertions(+) diff --git a/src/utils/bonus.js b/src/utils/bonus.js index b032634..4f5ed11 100644 --- a/src/utils/bonus.js +++ b/src/utils/bonus.js @@ -272,5 +272,8 @@ export function desensitizeIdNumber(idNumber) { // 对手机号码进行脱敏 export function desensitizePhone(phone) { + if (!phone) { + return '-' + } return phone.replace(/^(\d{3})\d{4}(\d{4})$/, '$1****$2') }